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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TabIndex property in Excel VBA

Status
Not open for further replies.

dcw888

Programmer
Joined
May 21, 2001
Messages
3
Location
US
Does anyone know why there isn't a TabIndex property in Excel VBA (I'm using Excel 97), or what I may be doing wrong that I can't see it? The Online Help indicates there should be, but I cannot find it.
I am trying to order my textboxes, and I've tried the following:
1. In the properties window, there is no TabIndex property.
2. At runtime, I tried
Sheet1.txtDate.TabIndex = 0
Sheet1.txtProgName.TabIndex = 1
and got a runtime error 438 where "Object doesn't support this property or method"
3. I tried View|TabOrder, but the TabOrder is grayed out.

Can someone tell me how to tab order my controls, please? I'm stumped!

Thanks in advance,
Denise
 
The TabIndex property is only available on forms. I think that you need to insert them in order on a worksheet.
 
Thank you, dsi. You were correct; it only works on forms.

Thanks again!:-)
 
I now have an Excel spreadsheet - not a form - and I have put controls (in particular, my textboxes) on it. I have tried playing with every property for these boxes, but nothing will allow me to tab or enter out of these controls without using the mouse. I've thought about writing code to advance the focus to another control, but I run into problems there as well. Does anyone know how to tab from control to control when the control is not on a form? Is it even possible?

Any help would be greatly appreciated,
Thanks in advance,
Denise
 
I'm picking up an old query from some time ago in the hope that somebody can give me a bit more information on this. I am attempting to do the same as the previous post -

I have an Excel spreadsheet onto which I have dropped text boxes, combo boxes etc from the control toolbox. These controls are dropped directly onto the Excel sheet - they are not in a form.

What I want to do is have the tab key move from one control to the next with a tab order which I have specified.

I am using Excel 2000, the previous post was Excel 97 - hopefully Microsoft have provided a few new tricks?

Is this possible? If so how do I go about this?

Many thanks

Ade
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top