+ Reply to Thread
Results 1 to 5 of 5

Using TabOrder to identify controls

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Using TabOrder to identify controls

    I have a UserForm with 12 TextBoxes the values of which I need to enter into a WorkSheet.

    I have given these controls tab indexes from 0 to 11.

    I have been trying, unsuccessfully, to write code that will do the transfer on the lines of:-
    Please Login or Register  to view this content.
    I know that I could accomplish this by using a control name such as "TextBox" & i but this way is not available to me as it is being used already for another purpose.
    I hope that somebody will be able to put me on the right path.
    John

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

    Re: Using TabOrder to identify controls

    John

    You can't identify controls in this way using TabOrder or TabIndex.

    There might be some convoluted method of using TabIndex, probably involving looping, but I'm not sure.

    Have you looked at using the Tag property of the textboxes?
    If posting code please use code tags, see here.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Using TabOrder to identify controls

    Hi,

    Have you considered using the TAG property?
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Manchester England
    MS-Off Ver
    Excel 2010
    Posts
    992

    Re: Using TabOrder to identify controls

    I have followed your suggestion and used the Tag property with code as follows:-
    Please Login or Register  to view this content.
    All works well till Ctrl.Value = Sheets("Customer_Complaints").Range(Cells(RowNo,a+1)).value
    This gives an Application defined or Object defined error. Ctrl.Tag is what I expected, but I suspect that Ctrl.Value might be wrong.Can anyone help please?
    John

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

    Re: Using TabOrder to identify controls

    Try just using Cells on its own.
    Please Login or Register  to view this content.

+ 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. Form Controls v. ActiveX Controls
    By Richard Stringfellow in forum Excel General
    Replies: 2
    Last Post: 01-11-2016, 08:06 PM
  2. column comparison, trying to identify identify identical columns.
    By Jowel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-24-2014, 04:12 AM
  3. Form Controls / Active X controls to record and log information in a seperate sheet
    By marcbarnett in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-09-2014, 05:00 AM
  4. Replies: 1
    Last Post: 05-01-2014, 05:15 PM
  5. Form controls vs. ActiveX controls
    By wmorrison49 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-25-2008, 10:59 AM
  6. [SOLVED] ActiveX Controls vs Form Controls
    By Alex in forum Excel General
    Replies: 1
    Last Post: 01-11-2006, 04:50 AM
  7. [SOLVED] Event procedures for controls added with Controls.Add
    By John Austin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2005, 01:06 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