This code uses winapi messages and works like a charm!!!
Hold Shift to scroll by page
#ifwinactive ahk_class wndclass_desked_gsk ~*WheelDown::ScrollVBA(1) ~*WheelUp::ScrollVBA(0) ScrollVBA(scrollCode) ;; 0=up, 1=down { ControlGetFocus,vbaCtl ControlGet,hwndVBActl,HWND,,%vbaCtl% winGetTitle,vbaTitle,ahk_id %hwndVBActl% if (inStr(vbaTitle,"(Code)")) { ControlGet,hwndScroll,HWND,,ScrollBar2 goto Scroll } ControlGetPos,cx,cy,cw,,%vbaCtl% loop,15 { ControlGetPos,sx,sy,,,ScrollBar%A_Index% if (abs(sx-cx-cw)<30) and (abs(sy-cy)<30) { ControlGet,hwndScroll,HWND,,ScrollBar%A_Index% break } } ifEqual,hwndScroll,,return Scroll: if (GetKeyState("Shift")) sendmessage,277,% 2+ScrollCode,%hwndScroll%,%vbaCtl% else loop,4 sendmessage,277,%ScrollCode%,%hwndScroll%,%vbaCtl% } #ifWinActive
updated: doesn't use index to determine current control but vbaWindow's title instead
updated2: enumeration of scrollbars>2 for more robust catching of correct scrollbar