El evento que necesitas es el KeyDown y para garantizar que el form recibirá ele vento, sea cual sea el control con foco, se antepone la propiedad KeyPreview como True
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF1 Then
MsgBox "Ejecución de codigo"
End If
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
End Sub