Results 1 to 4 of 4

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

Threaded View

dutel How to Call an userform's... 08-14-2017, 02:30 PM
YasserKhalil Re: How to Call an userform's... 08-14-2017, 03:02 PM
dutel Re: How to Call an userform's... 08-14-2017, 03:12 PM
YasserKhalil Re: How to Call an userform's... 08-14-2017, 03:41 PM
  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)

    Private Sub UserForm_Initialize()
    
    with sheet(1).range("A1").Value '="cbx_test"
       .AddItem "banana"
    end with 
    
    End sub
    Thank you
    Last edited by dutel; 08-14-2017 at 03:10 PM.

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