+ Reply to Thread
Results 1 to 4 of 4

Setting Tab Index for Text Fields

  1. #1
    Vamshi Krishna
    Guest

    Setting Tab Index for Text Fields

    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.


  2. #2
    Jim Rech
    Guest

    Re: Setting Tab Index for Text Fields

    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
    "Vamshi Krishna" <Vamshi [email protected]> wrote in message
    news:[email protected]...
    | 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.
    |



  3. #3
    Vamshi Krishna
    Guest

    Re: Setting Tab Index for Text Fields

    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
    > "Vamshi Krishna" <Vamshi [email protected]> wrote in message
    > news:[email protected]...
    > | 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.
    > |
    >
    >
    >


  4. #4
    Jim Rech
    Guest

    Re: Setting Tab Index for Text Fields

    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
    "Vamshi Krishna" <[email protected]> wrote in message
    news:[email protected]...
    | 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
    | > "Vamshi Krishna" <Vamshi [email protected]> wrote in
    message
    | > news:[email protected]...
    | > | 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.
    | > |
    | >
    | >
    | >



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1