+ Reply to Thread
Results 1 to 5 of 5

grouping multiple textboxes on a user form

  1. #1
    Registered User
    Join Date
    12-20-2008
    Location
    Arkansas
    MS-Off Ver
    2010
    Posts
    87

    grouping multiple textboxes on a user form

    Hi folks,

    I have a user form that has about 70 text boxes for individual entries. They all respond to a "Change" event, and they all go to a single macro that re-figures the entire form. I currently have,

    Please Login or Register  to view this content.
    through Sub L_20_Change()

    Is there a way to make 3 groups or arrays that will look for these and send them to the update macro?

    The reason for 3 is that 1 uses L as the start of the name, another uses pat_1 through pat_10 and another uses textbox1 through textbox10.

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

    Re: grouping multiple textboxes on a user form

    Is that code for one of the textboxes?

    If it is why do you only go up to L_20 when there are 70 textboxes?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-20-2008
    Location
    Arkansas
    MS-Off Ver
    2010
    Posts
    87

    Re: grouping multiple textboxes on a user form

    70 was a quick guess. There are 40, 20 in one group, and 10 in each of 2 other groups.

    And yes, each textbox has an individual "sub" to check for changes. That's what I want to reduce.

    Like one array for the "L" group, one array for the "pat" group and so on.
    Last edited by Obfuscated; 03-27-2013 at 04:39 PM.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Sorry you've kind of lost me.

    Don't you know how many textboxes you have?

    Do you need to 'group' them?

    If there is some sort if naming convention could you not use that to determine what to do?

    What is it you want to do anyway?

  5. #5
    Registered User
    Join Date
    12-20-2008
    Location
    Arkansas
    MS-Off Ver
    2010
    Posts
    87

    Re: grouping multiple textboxes on a user form

    I've attached the file. I want to reduce the number of "Change" events.
    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)

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