Private Declare Function GetKeyState Lib"user32"(ByVal nVirtKey As Long) As IntegerDo If GetKeyState(49)=-127 or GetKeyState(49)=-128 KeyDown "Shift", 1 LeftDown 1 Do Loop Until GetKeyState(49) >= 0 LeftUp 1 KeyUp "Shift", 1 End IfLoop