+ Reply to Thread
Results 1 to 7 of 7

Controlsource Set

  1. #1
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    140

    Controlsource Set

    Hi,
    I have a worksheet with 2 userforms (Userform1 &2). In Userform1 i have a Combobox1 which value will show in the Userform2 Textbox1 when i will unload the Userfomr1. I have checked this can happen by use of Controlsource. But i am not aware of it how can i set. Please help. Thanks.

  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: Controlsource Set

    You could only do it if you transferred the value from the combobox on UserForm1 to a cell and set the ControlSource of the textbox on UserForm2 to the cell you put the value in.

    It would be far easier to just transfer the value straight into the textbox from the combobox.

    How you would do that would really depend on how/when you are showing the 2 userforms.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    140

    Re: Controlsource Set

    Hi,
    Thanks Mr. Norie for your suggestion. But can you explain how to do this if the Combobox value is transferred in a cell and it will show in the Textbox in Userform2. Waiting for your reply. Thanks.

  4. #4
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    140

    Re: Controlsource Set

    Hi,
    Thanks Mr. Norie for your suggestion. But can you explain how to do this if the Combobox value is transferred in a cell and it will show in the Textbox in Userform2. Waiting for your reply. Thanks.

  5. #5
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    140

    Re: Controlsource Set

    Sorry posting double reply. So i have edited because it was not deleted.

  6. #6
    Registered User
    Join Date
    06-25-2014
    Location
    Budapest, Hungary
    MS-Off Ver
    2007
    Posts
    40

    Re: Controlsource Set

    Without seeing your workboook heres my solution:

    1. Passing the combobox1.value to a global variable on userform1 unload
    2. Set textbox1.value to this variable on userform2 load.

    Sample workbook uploaded.

    Sample_Text_Transfer.xlsm

  7. #7
    Forum Contributor
    Join Date
    02-16-2011
    Location
    Maharashtra, Thane
    MS-Off Ver
    Excel 2021
    Posts
    140

    Re: Controlsource Set

    Thanks Mr. Dose for your help. It is working fine. My problem solved.

+ 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. .ControlSource
    By Ctech in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-27-2006, 08:20 AM
  2. Controlsource Puzzlement
    By Francis Knight in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-14-2005, 05:25 PM
  3. [SOLVED] TextBox ControlSource
    By marwan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-19-2005, 02:05 PM
  4. Controlsource errors
    By Mats Samson in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-04-2005, 12:05 PM
  5. [SOLVED] ControlSource
    By Greg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2005, 12:06 AM

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