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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

F-key for closing form

Status
Not open for further replies.

Mollethewizard

IS-IT--Management
Nov 18, 2002
93
SE
Good morning!

Is there a way to close/hide a user form by using one of the F-keys? Any code suggestions?

Greetings Christer
 
I've tested this code - which didn't work. Why?

Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
ShiftKey = Shift And 7
If KeyCode = vbKeyF2 Then
frmTyp.Hide
End If
End Sub

Christer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top