S
Steve
I am trying to use data from a separate file to populate a ComboBox but am
having trouble. the code is crashing on the follwing statement;
"wb1.Sheets("GUI").ComboBox1.ListFillRange =
wb2.Sheets("Info").Range("A1:A4")". Could someone point me in the right
direction please?
Dim Sht As Worksheet
Dim FolderName As String
Dim wb1, wb2 As Workbook
FolderName = "C:\info.xls"
Set wb1 = ThisWorkbook
Set wb2 = Workbooks.Open(FolderName)
For Each Sht In wb2.Worksheets
If Sht.Name = "Info" Then
wb1.Sheets("GUI").ComboBox1.ListFillRange =
wb2.Sheets("Info").Range("A1:A4")
wb2.Close 'False
Exit For
End If
Next Sht
having trouble. the code is crashing on the follwing statement;
"wb1.Sheets("GUI").ComboBox1.ListFillRange =
wb2.Sheets("Info").Range("A1:A4")". Could someone point me in the right
direction please?
Dim Sht As Worksheet
Dim FolderName As String
Dim wb1, wb2 As Workbook
FolderName = "C:\info.xls"
Set wb1 = ThisWorkbook
Set wb2 = Workbooks.Open(FolderName)
For Each Sht In wb2.Worksheets
If Sht.Name = "Info" Then
wb1.Sheets("GUI").ComboBox1.ListFillRange =
wb2.Sheets("Info").Range("A1:A4")
wb2.Close 'False
Exit For
End If
Next Sht