I am filling a combobox with the names of the sheets in an excel workbook
Dim xlApp As Excel.Application
Dim i As Integer
Set xlApp = GetObject(, "Excel.Application")
'Set xlApp = CreateObject("Excel.Application")
'Set xlApp = CreateObject("Excel.Application.5")
xlApp.Workbooks.Open txtSpreadSheet, 0, True 'Open read only
For i = 1 To xlApp.Sheets.Count - 1
If xlApp.Sheets(i).Visible Then
cboSheets.ItemData(cboSheets.NewIndex) = i
This works fine on my PC and on some others, however it wont work on the PC that matters.
Error 1004: Open method of Workbooks Class Failed.
Are there files that I need to distribute to use the Excel object (I have included xl5en32.olb and all files from the application setup wizard dependency file)
Works fine on my PC VB5 & Office 95
Works fine on PC with Office 97
Error on PC with Office 95
Anyone have any Ideas?