Consulting

Results 1 to 2 of 2

Thread: Help with userform combobox and Excel

  1. #1
    VBAX Regular
    Joined
    Sep 2004
    Location
    Sydney, Australia
    Posts
    34

    Help with userform combobox and Excel

    Hi
    I have a userform that has a few comboboxes. Each combobox has several option from which, once clicked, requests data from an API data field. This data is then fed back to my Excel spreadsheet. Myquestion: How do I get excel to change the name of its header column to equal that chosen in the userform. Thus, if I choose "Div Yield", then the name at the top of column C5 should change to Div Yield as well. But must be allowed to change if another option is chosen later.
    Hope I have made myself clear.

    Thanx
    Suju


    Land Down-Under... Over the Hill and Farrrr Away.

  2. #2
    BoardCoder
    Licensed Coder
    VBAX Expert mark007's Avatar
    Joined
    May 2004
    Location
    Leeds, UK
    Posts
    622
    Location
    I'm not entirely clear what you are after but I think what you want is comething like:


    Private Sub Combo1_Change()
    thisworkbook.sheets("Lists").Range("a1").value=Combo1.Text
    End Sub

    i.e. Just set the value of the relevant cell when the combo changes.

    "Computers are useless. They can only give you answers." - Pablo Picasso
    Mark Rowlinson FIA | The Code Net

Posting Permissions

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