filling combo box
Mike,
This is the sort of thing.
This example loads the combobox directly
Workbooks.Open Filename:="c:\myTest\Testfile_1.xls"
With ThisWorkbook.Worksheets("Sheet1")
For i = 1 To 10
.ComboBox1.AddItem ActiveSheet.Range("B" & i).Value
Next i
.ComboBox1.ListIndex = 0
End With
ActiveWorkbook.Close
This example copies the data to this workbook and directs the combobox to
that data
Workbooks.Open Filename:="c:\myTest\Testfile_1.xls"
With ThisWorkbook.Worksheets("Sheet1")
ActiveSheet.Range("D1:D10").Copy .Range("A1")
.ComboBox1.ListFillRange = "A1:A10"
.ComboBox1.ListIndex = 0
End With
ActiveWorkbook.Close
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Mike" wrote in message
news:jvyQb.109927$Rc4.780708@attbi_s54...
Is there a site with sample code? This is a combo box on the worksheet,
not
a userform.
|