Postup:
Nejprve je nutnΘ nastavit vlastnost KeyPreview formulß°e na True
a pak pohyb mezi textboxy pomocφ kurzorov²ch klßves zapφÜeme na udßlost
KeyDown formulß°e:
Sub Form_KeyDown(KeyCode As
Integer, Shift As Integer)
If
KeyCode = vbKeyUp Then
If TypeOf ActiveControl Is TextBox Then
'
Üipka nahoru - p°esun na p°edchozφ prvek
SendKeys
"+{Tab}"
KeyCode = 0
End If
ElseIf KeyCode = vbKeyDown Then
If TypeOf ActiveControl Is TextBox Then
'
Üipka dol∙ - p°esun na dalÜφ prvek
SendKeys "{Tab}"
KeyCode = 0
End If
End If
End Sub
|