Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Tab Function for textboxes on Worksheet not UserForm
I am trying to set a tab order for a area of textboxes that are directly on a
worksheet, not the UserForm. Anyone know how to do this? I am not savvy enough to figure it out. Any help is greatly appreciated. Thanks Linda |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Tab Function for textboxes on Worksheet not UserForm
You can do this by "cheating" a little bit. First off, you will have to use
an ActiveX text boxes from the Visual Basic toolbar. In the Properties box, set the TabKeyBehavior property for **each** TextBox to True. Next, use the KeyPress event check for the Tab key and, if pressed, cancel it and activate the next TextBox that you want to have focus. Here is the KeyPress event for TextBox1 which sets focus to TextBox2 if the Tab key is pressed... Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If KeyAscii = vbKeyTab Then KeyAscii = 0 TextBox2.Activate End If End Sub You will need to use the exact same code (except for the name of the TextBox to activate) in each TextBox's KeyPress event. Rick "LRay67" wrote in message ... I am trying to set a tab order for a area of textboxes that are directly on a worksheet, not the UserForm. Anyone know how to do this? I am not savvy enough to figure it out. Any help is greatly appreciated. Thanks Linda |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
userform textboxes saving numerical data as text in worksheet | Excel Programming | |||
UserForm TextBoxes | Excel Discussion (Misc queries) | |||
Copying multiline textboxes from userform to worksheet cell | Excel Programming | |||
how do I link Textboxes in a userform to a Cell in a Worksheet? | Excel Programming | |||
userform textboxes again | Excel Programming |