+ Reply to Thread
Results 1 to 4 of 4

Assigning a value to a cell from a combox

  1. #1
    Registered User
    Join Date
    10-29-2005
    Posts
    12

    Exclamation Assigning a value to a cell from a combox

    Hi all,

    I have a 2 combobox and a button in my work sheet

    On click of this button,
    the values in combobox must be assigned to a cell
    (assume h8 and h9).

    can any one please help me to solve this problem.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning sjayar

    It really depends on how you have set up your combo box and button. If you have done it through the control toolbox use this code attached to your button (double click on the button to open up the code window).

    Range("H8").Value = ComboBox1.Value
    Range("H9").Value = ComboBox2.Value

    If you are doing it through the forms toolbar then you're making life a bit more difficult for yourself because I think that this can be set to return only the position of your selection (ie., 1,2,3 etc) but not the actual combobox value. To set this, right click and select Format Control, Control and enter a cell in the cell link box. You would then need to use a lookuptable or something to find out the value.

    HTH

    DominicB

  3. #3
    Registered User
    Join Date
    10-29-2005
    Posts
    12

    hi

    hi ,
    thank u very much .
    it worked.
    lots and lots of thanks to you.

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Hi sjayar

    You're welcome. Appreciate the feedback.

    DominicB

+ 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