+ Reply to Thread
Results 1 to 10 of 10

Tab index Property

  1. #1
    Forum Contributor
    Join Date
    06-12-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    167

    Tab index Property

    Hello,

    I have a huge userform with a bunch of controls on it that I need to set the tab index for. I have between 200 and 60 controls on 6 different pages that follow a name & number type naming. I wanted to change the index in a loop rather than click and change a whole bunch of times. Is this possible?

    Side note for if it matter:
    The controls are in a frame (each named by a **Frame) that is on a multipage(named multipage2) that is on a multipage(named multipage1) on a form (named fsrform)

    Please Login or Register  to view this content.
    Here is what I tried:

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Tab index Property

    If you are trying to make a permanent change, you either need to do it manually at design time, or use code to alter the properties using the Designer property of the VBComponent. Manually is usually not that arduous if you simply select the controls in order using the Ctrl key and then type 0 as the tab index for the first control in the properties window- all the others will be ordered based on the order you clicked them.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    06-12-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    167

    Re: Tab index Property

    What is the designer property?

    And the for the ctrl method if I type in like 5 it would count as the first as 5 next 6 ect right?

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Tab index Property

    Yes, that's correct.

    For the designer, you would use code like this
    Please Login or Register  to view this content.
    Note that the form cannot be loaded when you run that code.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: Tab index Property

    Have you tried right clicking the form and selecting Tab Order?

    That will give you a dialog where you can change the order of controls (and groups of controls).
    If posting code please use code tags, see here.

  6. #6
    Forum Contributor
    Join Date
    06-12-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    167

    Re: Tab index Property

    What do you mean by the form can not be loaded?

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Tab index Property

    I mean that it won't work if the form is currently loaded. As long as you haven't loaded it in code, you should be fine. This is not code that you put in the forms' Initialize event for example- you just run it once from a module.

  8. #8
    Forum Contributor
    Join Date
    06-12-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    167

    Re: Tab index Property

    So as long as I don't have the form running it should work?

    I had an issue with it and I closed the file opened it and went directly to the code that matches what you posted and ran it. The values did not change. Could I maybe have to do an unload FSRform?

  9. #9
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Tab index Property

    If you never loaded the form you should not have to unload it- and you should get an error running the code if the form is loaded. Can you post the workbook?

  10. #10
    Forum Contributor
    Join Date
    06-12-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    167

    Re: Tab index Property

    I can't post the full workbook due to company contracts but I can post the form and if it works then I can just reimport it.

    If you go to the systems page you will find 7 other pages. On there the last 6 have rows with 4 controls in a frame that follow a similar naming convention with just a few letter changes for each page.

    I would like to tab from employee name to employee primary title to job description to Shift then the next row.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] vba excel - invalid property array index error on form reload
    By terriertrip in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-17-2017, 10:18 AM
  2. unable to get match property error in userform derived index match
    By alexcrofut in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-05-2015, 09:21 PM
  3. Runtime error 381: Could not set the list property.Invalid property array index
    By rohith4prithvi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2014, 10:24 PM
  4. [SOLVED] Excel run-time error '381': Could not set the List property. Invalid property array index
    By eemiller1997 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-20-2012, 12:48 PM
  5. [SOLVED] Invalid property array index - Dropdown list
    By questionguy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2012, 11:20 AM
  6. Invalid Property Array Index
    By zplugger in forum Excel General
    Replies: 6
    Last Post: 02-03-2011, 11:07 AM
  7. return text not index for property
    By Nicky in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-21-2005, 09:49 PM

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