Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbShiftMask?

Status
Not open for further replies.

gtroiano

Technical User
Nov 7, 2001
99
US
i found this code in a thread:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Dim ShiftDown, AltDown, CtrlDown, Txt
ShiftDown = (Shift And vbShiftMask) > 0
AltDown = (Shift And vbAltMask) > 0
CtrlDown = (Shift And vbCtrlMask) > 0

If CtrlDown Then
Select Case KeyCode
Case vbKeyRight
MsgBox "Ctrl+RightArrow pressed."
Case vbKeyHome
MsgBox "Ctrl+Home pressed"
End Select
End If
End Sub


but when i try to use it i get a "Variable not defined" error on vbShiftMask. i looked in the object browser and i could not find it. Does anyone know what the deal is with this thing?

jerry.
 
nevermind. i figured it out. i should have waited an extra minute before posting my question. thanks

jerry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top