+ Reply to Thread
Results 1 to 2 of 2

Passing ComboBox from event procedure to module?

  1. #1
    Registered User
    Join Date
    12-03-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    1

    Passing ComboBox from event procedure to module?

    I have an Active X combo box coded in an event procedure on a sheet (ComboBox1_DropButtonsClick). I want to set the combo box's value to a variable like this:

    answer = ComboBox1.Value

    I then want to pass that variable to the main module so that I can do a select case with the selection. However, the main module does not recognize ComboBox1 as a valid object. How do I pass the combo box's value in a variable from an event procedure in a sheet to a module?

    Thanks!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Passing ComboBox from event procedure to module?

    You can reference it using the CodeName of the sheet, e.g., Sheet1.ComboBox1.Value
    Entia non sunt multiplicanda sine necessitate

+ 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