Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Combo Boxes

  1. #1
    New Member
    Join Date
    Mar 2002
    Location
    rejdus@hotmail.com
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a problem with combo boxes.
    I have spreadsheet with database with clients name on it.

    i want to put combobox onto other spreadsheet, whcih woul be linked to the database one.

    Thanx 4 help.

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Wellington
    Posts
    115
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi,

    You might want to try the following:

    {
    Dim Names(10) As String
    Workbooks("C:tempbook1.xls").Open
    For i = 1 To 10
    Names(i) = Range("A1").Offset(i - 1, 0).Value
    Next i
    ActiveWorkbook.Close (False)
    For i = 1 To 10
    Sheets("sheet1").ComboBox1.AddItem Names(i)
    Next i
    }

    What the above doing is:
    1. opens the other workbook, read the list of names/data you are after into memory/array.
    2. closes the workbook without saving changes.
    3. insert these names to the combobox.

    Hope it helps

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
  •