flyingDman wrote: ↑22 Sep 2021, 22:49
Your original script works fine here. I cannot reproduce the error. Unlikely it is a bug with AHK.
I also cannot replicate the problem. Script works fine for me.
I can also change to
Shift or
Alt with no problem. No Error (0x800AC472) even if I try. It is also really unusual that changing to
Shift could still causes the sheet to jump to the top or bottom as Shift-Arrow is not the native action to move to the top or bottom.
You say you turn it off and on when you need to scroll. Maybe that code is not working properly or as expected. Any other AHK code you have running could play a part in the behavior.
Maybe you have another script, macro, add-on, or program running that is interfering.
Also Error (0x800AC472) is pretty unusual. That generally means that Excel has shut down communication with other programs. Mostly pretty weird stuff can cause that. Licensing problems, security issues, certificates, etc. Or if the COM object table is overloaded by something like having many many versions of Excel running when
ComObjCreate("Excel.Application") is used repeatedly without closing each process or anything that could create an unreasonable number of COM object table entries.
Long story short, it is unlikely a bug with AHK.
FG