Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove labels from tab order

Status
Not open for further replies.

mintjulep

Technical User
Aug 20, 2004
1,551
JP
On a VBA user form (I'm using Excel at the moment, but I hope this is consistent), is there a way to remove all label objects from the tab order dialog and from the tab sequence?

Enabled = false takes them out of the sequence, but it also causes them to be greyed out when the form is displayed. I want the labels to display, but to not be in the tab sequence.

 
Ok, TabStop = false at least gets them out of the sequence, although they still show in the tab order dialog.
 
mintjulep,
[tt].TabStop = False[/tt]?

CMP (Excel 2003)

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
I don't think so. TabIndex is a property. I don't know how you would remove a property. You can set its value, but how would you remove a property from an object? So, the control HAS a TabInbdex (which can be set), and it HAS a TabStop (which can be set).

So TabStop = False should do it from a practical point of view. Focus will not go to the control with a Tab. However, it will still remain in the tab order, it will still have a value as TabIndex, and it still will be clickable.

Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top