+ Reply to Thread
Results 1 to 9 of 9

Simple ComboBox Question

Hybrid View

  1. #1
    Registered User
    Join Date
    04-22-2004
    Posts
    6

    Simple ComboBox Question

    Carrying over combobox values--

    Say I want The Value of ComboBox1 on Sheet 1 to carry over so that the value of ComboBox1 on Sheet 1 is exactly the same.

    What is the code for that? I'm sure this is incredibly easy but I cannot figure it out.

    -thanks

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello JLarkin,

    It is not clear from your post what you want to do. I suspect you want to be able to retrieve, set or clear the contents of the ComboBox. Use a fully qualified reference to the ComboBox and you should not have any problems.

    Example of returning text from ComboBox on Sheet1...

    Text = Worksheets("Sheet1").ComboBox1.Value

    Hope this helps,
    Leith Ross

  3. #3
    Registered User
    Join Date
    04-22-2004
    Posts
    6
    I should have been more clear..


    On sheet1 I have a Combobox (the control toolbox, not the Forms one)

    and on sheet2 I have another ComboBox (again from the control toolbox)

    I need the Combobox on Sheet2 to mirror the ComboBox on sheet 1.

    So basically Sheet1.comboxbox1.value will always = Sheet2.ComboBox1.value

    I know, I know... i should be able to figure this out... but it's been bugging me for a while.

  4. #4
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    double click checkbox in Sheet1(design mode) and paste the below code


    Private Sub CheckBox1_Click()
    Sheets("Sheet2").CheckBox1.Value = ActiveSheet.CheckBox1.Value
    End Sub

  5. #5
    Registered User
    Join Date
    04-22-2004
    Posts
    6
    I tried that...

    unfortunately it's not working...

  6. #6
    Forum Contributor
    Join Date
    11-09-2004
    Posts
    451
    Is there any error message, if there is no error message then I think you didnot past the code in correct location

+ 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