+ Reply to Thread
Results 1 to 4 of 4

How to Call an userform's Control with its name stored in a worksheet

  1. #1
    Registered User
    Join Date
    11-30-2012
    Location
    Quebec, Quebec
    MS-Off Ver
    Excel 2003
    Posts
    5

    How to Call an userform's Control with its name stored in a worksheet

    Hello,

    1. on sheets(1), cells("A1") has the name of a combobox "cbx_test" .
    2. on a userform1, I have created a combo called "cbx_test".

    With VBA, when Userform1 initialise, I try to call the combobox with the value stored in "A1"

    something like (this actual code doesn't work)

    Please Login or Register  to view this content.
    Thank you
    Last edited by dutel; 08-14-2017 at 03:10 PM.

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: How to Call an userform's Control with its name stored in a worksheet

    Hello
    Try this code
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Registered User
    Join Date
    11-30-2012
    Location
    Quebec, Quebec
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: How to Call an userform's Control with its name stored in a worksheet

    Thanks it works

    FYI the .Item() works too:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: How to Call an userform's Control with its name stored in a worksheet

    You're welcome. Glad I can offer some help
    And thanks for the information
    Regards

+ 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. VBA macro to call and import control data from a network attached worksheet or ini?
    By PatRiot199 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2016, 04:47 PM
  2. [SOLVED] Call userform control click event indirectly
    By ryan.wherry in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-26-2015, 11:42 AM
  3. [SOLVED] Call different macros using multiple control checkboxes in a userform
    By Sideshow1447 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-04-2013, 04:39 PM
  4. How to access bitmap picture stored as property of image control on userform
    By Spere in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-17-2013, 05:41 PM
  5. [SOLVED] Data previously entered on UserForm dissappears, but still stored on worksheet - Excel VBA
    By eemiller1997 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-19-2012, 12:24 PM
  6. Userform Call Macro on Control Change
    By fire_water in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2009, 12:42 PM
  7. How to call userform/sub in Addin from worksheet event
    By RobynC in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-30-2007, 08:01 AM

Tags for this Thread

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