+ Reply to Thread
Results 1 to 2 of 2

Create Sub for Userform that runs after "Change" event for input boxes of similar name.

  1. #1
    Registered User
    Join Date
    12-09-2011
    Location
    Arkansas, US
    MS-Off Ver
    Excel 2003
    Posts
    3

    Create Sub for Userform that runs after "Change" event for input boxes of similar name.

    I have a userform that contains a multipage in it. Each page has various combo boxes, and they have similar names (CBox0, CBox1, CBox2, etc.). I want to create a universal sub that will run whenever the value in any of these input boxes is changed instead of creating a sub for each "change" event. Is it possible to create something like:

    Sub CBox(i)_Change() where i is equal to the index of the current page of the multipage.

    Programming

    End Sub

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Create Sub for Userform that runs after "Change" event for input boxes of similar name

    The easy way is to create a sub that you want to run and then call this sub on the change event of the combobox, so eg;
    Please Login or Register  to view this content.
    There is another way but its far more advanced and involves creating an event handling class

+ 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