Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: combo box problem

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have made a combobox which lists wards which medication is to be sent to. I need to know how:
    when the user clicks on one of the 10 ward which drop down from the combo box, this then appears in another cell.
    So far i can only manage (using the help) to get it to return a number which relates to the position in the drop down list which is clicked. i need it to return the text (ward) which is clicked on. I'm sorry if this isn't clear but i'm a bit new to control buttons and macros and stuff.
    i'd really appreciate some help
    jamie

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Where the wild roses grow
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


    OK, say you want it in Cell A1, you'd need to put put this in your Combobox event:

    Worksheets("sheetwhatever").range("a1").value = combobox1

    Hope this helps

  3. #3
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Jamie


    I have an example here that would be helpful. It has the formula you need to return the text from the ComboBox, among other things.

    http://www.ozgrid.com/download/default.htm
    Down the very bottom is:
    ChangingCombo2.zip
    Download it.







  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Bogota, Colombia
    Posts
    11,959
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    If you're using a Form toolbar ComboBox use the Linked cell to get the "row" number of the selection, then use the INDEX function to retrieve the "actual" selected text. Something like

    =INDEX(ComboBoxFillRange,LinkedCell)
    Regards,

    Juan Pablo González
    http://www.juanpg.com

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •