Declare PtrSafe Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Public Function saChkKey(vKey As Long, Optional vKey2)
Dim Rsp As Integer
Rsp = GetAsyncKeyState(vKey)
If (Rsp And &H8000) = &H8000 Then
If IsMissing(vKey2) = False Then
Rsp = GetAsyncKeyState(vKey2)
If (Rsp And &H8000) = &H8000 Then
saChkKey = True
Else
saChkKey = False
End If
Else
saChkKey = True
End If
Else
saChkKey = False
End If
End Function