Je cherche le moyen de programmer via VBA une combinaison de touches pour passer d'une colonne (contenant combobox) à l'autre.
Je m'explique.. j'ai prévu ce code pour le "TAB" :
Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 9 Then ActiveCell.Offset(, 1).Select
End Sub
Je cherche maintenant à dire que si on appuie sur "SHIFT" + "TAB" ça revient à la colonne précédente.
J'ai essayé :
Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 9 + 16 Then ActiveCell.Offset(, -1).Select
End Sub
Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 9 Then
If Shift = 1 Then
ActiveCell.Offset(, -1).Select
Else
ActiveCell.Offset(, 1).Select
End If
End If
End Sub