Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
userform textboxes saving numerical data as text in worksheet buckchow[_3_] Excel Programming 0 January 16th 07 05:06 AM
UserForm TextBoxes Rob Excel Discussion (Misc queries) 2 August 6th 05 03:07 AM
Copying multiline textboxes from userform to worksheet cell Leighton Harker Excel Programming 1 September 25th 04 04:14 PM
how do I link Textboxes in a userform to a Cell in a Worksheet? Paul Clark Excel Programming 2 January 17th 04 05:16 PM
userform textboxes again Jo[_6_] Excel Programming 4 October 21st 03 07:25 PM


All times are GMT +1. The time now is 02:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"