enter y tab
Necesito código para que cuando el usuario presione Enter en un Textbox pueda pasar a otro Textbox.
Además les agradecerÃa me dijesen como puedo desplegar un combobox presionando Enter. Gracias.
Además les agradecerÃa me dijesen como puedo desplegar un combobox presionando Enter. Gracias.
espero te sirva.
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
SendKeys "{TAB}"
KeyAscii = 0
End If
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
SendKeys "{TAB}"
KeyAscii = 0
End If
End Sub
a ver, simplemente usa los eventos KEYPRESS de cada control...
Imaginate que tienes el TXT llamado txtClave
en el evento keyPress pon algo asi
if KeyAscii = 13 then ----------esto es el ENTER
otrocontrol.setfocus
end if
if KeyAscii = 32 then ----------SPACE BAR
otrocontrol.setfocus
end if
Imaginate que tienes el TXT llamado txtClave
en el evento keyPress pon algo asi
if KeyAscii = 13 then ----------esto es el ENTER
otrocontrol.setfocus
end if
if KeyAscii = 32 then ----------SPACE BAR
otrocontrol.setfocus
end if