![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: rejdus@hotmail.com
Posts: 18
|
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 |
|
Board Regular
Join Date: Mar 2002
Location: Wellington
Posts: 104
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|