Setting Tab Index for Text Fields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am designing a Data Entry kind of a form where I put Textboxes,
Comboboxes, etc., in Excel2003 sheet, I am almost finished with the
programming and validations, however I am facing a problem in moving the
cursor from one textbox to another, In Visual basic we have a property called
"TabIndex" for a Textbox, however I cannot see a "Tabindex" property for a
Textbox and there is no method called "SetFocus" for a textbox. Please help
me in completing my DataEntry form.

Thanks in Advance.
 
It is not possible to set focus to a control on a worksheet. Users will
have to click the control they want to use. If you require that kind of
functionality you'd have to create your form on a user form in the VBE.
Userforms are quite similar to the forms you're used to in standalone VB.

When I design 'forms' on a worksheet I use the cells for typed input as much
as possible so that tabbing between input cells is possible.

--
Jim
| Hi,
| I am designing a Data Entry kind of a form where I put Textboxes,
| Comboboxes, etc., in Excel2003 sheet, I am almost finished with the
| programming and validations, however I am facing a problem in moving the
| cursor from one textbox to another, In Visual basic we have a property
called
| "TabIndex" for a Textbox, however I cannot see a "Tabindex" property for a
| Textbox and there is no method called "SetFocus" for a textbox. Please
help
| me in completing my DataEntry form.
|
| Thanks in Advance.
|
 
Thank You for the response Jim,

I understand I cannot move the cursor in between textboxes, I tried
creating a Userform looks like a VBE form in Excel, by then when I close the
Excel sheet and Open it again I am not able to view the Userform, I can only
view the sheet, to view the Userform I need to go to VisualBasic ToolBar and
Click on Design. My aim is to save the Excel sheet as a Template where
others can use this DataEntry form to enter data, however If I am not able to
view the UserForm when I open this Template then I Cannot help my People,
Please provide me a Solution.

Thank You,
 
You do have to write some code to open the userform it is true. But the
code is extremely simple:

Sub ShowForm()
Userform1.Show
End Sub

You could attach this to a button on the worksheet so the user can click it
to open the form. Also you could call this macro from the workbook open
event handler (Sub Workbook_Open) in the ThisWorkbook module to have it
called automatically when the workbook is opened. Naturally the user has to
enable macros for any of this to work.

--
Jim
| Thank You for the response Jim,
|
| I understand I cannot move the cursor in between textboxes, I tried
| creating a Userform looks like a VBE form in Excel, by then when I close
the
| Excel sheet and Open it again I am not able to view the Userform, I can
only
| view the sheet, to view the Userform I need to go to VisualBasic ToolBar
and
| Click on Design. My aim is to save the Excel sheet as a Template where
| others can use this DataEntry form to enter data, however If I am not able
to
| view the UserForm when I open this Template then I Cannot help my People,
| Please provide me a Solution.
|
| Thank You,
|
| "Jim Rech" wrote:
|
| > It is not possible to set focus to a control on a worksheet. Users will
| > have to click the control they want to use. If you require that kind of
| > functionality you'd have to create your form on a user form in the VBE.
| > Userforms are quite similar to the forms you're used to in standalone
VB.
| >
| > When I design 'forms' on a worksheet I use the cells for typed input as
much
| > as possible so that tabbing between input cells is possible.
| >
| > --
| > Jim
message
| > | > | Hi,
| > | I am designing a Data Entry kind of a form where I put Textboxes,
| > | Comboboxes, etc., in Excel2003 sheet, I am almost finished with the
| > | programming and validations, however I am facing a problem in moving
the
| > | cursor from one textbox to another, In Visual basic we have a property
| > called
| > | "TabIndex" for a Textbox, however I cannot see a "Tabindex" property
for a
| > | Textbox and there is no method called "SetFocus" for a textbox.
Please
| > help
| > | me in completing my DataEntry form.
| > |
| > | Thanks in Advance.
| > |
| >
| >
| >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top