Consulting

Results 1 to 5 of 5

Thread: Solved: populate combobox problem

  1. #1
    VBAX Expert
    Joined
    Jan 2005
    Posts
    574
    Location

    Solved: populate combobox problem

    Hi All

    Can anyone tell me what is wrong with the code below please as it doesnt add anything to my combobox?

    thanks

    Gibbo

    [VBA]Dim iLastRow As Long

    iLastRow = Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Row

    ActiveWorkbook.Names.Add Name:="PopulateCombo", RefersToR1C1:=Sheets("Sheet2").Range("A1:A" & iLastRow)

    Me.ComboBox1.RowSource = PopulateCombo[/VBA]

  2. #2
    Administrator
    2nd VP-Knowledge Base
    VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Hey Gibbo,

    Try:

    [VBA]Me.ComboBox1.RowSource = Range("PopulateCombo").Address[/VBA]

    Good luck!




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  3. #3
    VBAX Regular
    Joined
    Oct 2005
    Posts
    26
    Location
    Hi Gibbo,

    Add quotes.

    Me.ComboBox1.RowSource = "PopulateCombo"

  4. #4
    Administrator
    2nd VP-Knowledge Base VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    Nice one benny Didn't think of that!




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

  5. #5
    VBAX Expert
    Joined
    Jan 2005
    Posts
    574
    Location
    Thankyou both,

    cant believe it was that simple

    Gibbo

Posting Permissions

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