Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have a worksheet containing 22 textboxes. They don't seem to have a built in tab-function. I've tried to use the key_down sub: Private Sub TextBox01_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 9 or KeyCode = 13 Then TextBox02.Activate End Sub I don't want to copy the code 22 times (for all 22 textboxes - the code quickly get unreadable), there must be a way to capture the keystrokes in one event and then call a public sub with the textbox name as an argument...for instance: Sub Tabhandler(ByVal TextBoxName as String) Dim strNr as String strNr=Right(TextBoxName,2) strNr=StrNr+1 ActiveSheet.Shapes(strNr).SetFocus End Sub I just want the user to be able to tab between all the textboxes in my worksheet. Perhaps there are other solutions to this problem? TIA PO |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Textboxes | Excel Discussion (Misc queries) | |||
tab between several textboxes | Excel Worksheet Functions | |||
Dates in TextBoxes | Excel Programming | |||
Textboxes | Excel Programming | |||
textboxes | Excel Programming |