J
JasonSelf
Lets get this out of the way...I am using the following for tabbing
between controls in my Excel sheet.
--------------------------------------------------------
Private Sub ComboBox103_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
Dim bBackwards As Boolean
Const ctlPrev As String = "ComboBox102"
Const ctlNext As String = "ComboBox104"
Select Case KeyCode
Case vbKeyTab, vbKeyReturn, vbKeyDown, vbKeyUp
Application.ScreenUpdating = False
bBackwards = CBool(Shift And 1) Or (KeyCode = vbKeyUp)
If Application.Version < 9 Then Sheet1.Range("A1").Select
If bBackwards Then
Range(ctlPrev).Activate
Else
ActiveSheet.OLEObjects(ctlNext).Activate
End If
Application.ScreenUpdating = True
End Select
End Sub
-------------------------------------------------------
This is fine but what If I want the next Item to be a cell in the
document, lets say E22. How can I have it tab to that cell and then
get E22 to tab away to the next thing I want a tab in?
If that makes any sense I would appreciate the help.
Thanks as Always,
Jason Self
between controls in my Excel sheet.
--------------------------------------------------------
Private Sub ComboBox103_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
ByVal Shift As Integer)
Dim bBackwards As Boolean
Const ctlPrev As String = "ComboBox102"
Const ctlNext As String = "ComboBox104"
Select Case KeyCode
Case vbKeyTab, vbKeyReturn, vbKeyDown, vbKeyUp
Application.ScreenUpdating = False
bBackwards = CBool(Shift And 1) Or (KeyCode = vbKeyUp)
If Application.Version < 9 Then Sheet1.Range("A1").Select
If bBackwards Then
Range(ctlPrev).Activate
Else
ActiveSheet.OLEObjects(ctlNext).Activate
End If
Application.ScreenUpdating = True
End Select
End Sub
-------------------------------------------------------
This is fine but what If I want the next Item to be a cell in the
document, lets say E22. How can I have it tab to that cell and then
get E22 to tab away to the next thing I want a tab in?
If that makes any sense I would appreciate the help.
Thanks as Always,
Jason Self