D
Dickson Law
Hi
I have a spreadsheets that has 2 combobox on it. I have a bit of code
to clear both of them when the spreadsheet is first open:
Set fSheet = Worksheets("Main")
Set fBookCombobox = fSheet.OLEObjects("A")
Set fCurrencyCombobox = fSheet.OLEObjects("B")
Call fBookCombobox.Object.Clear
Call fCurrencyCombobox.Object.Clear
and it works fine in excel 2000. When I open the same spreadsheet in
excel xp, I am getting "Run-time error '1004' unable to get teh object
property of the OLEobject class' at the 'Call
fBookCombobox.Object.Clear' line. In the Local window, Combobox named
'A' indeed is not there but 'B' is.
If I open the file in XP with macro disabled, save it and reopen in XP
again, the code works. But the down side is I gets the same error at
the same line when I now open the file in excel 2000. It looks like
there are some incompatibility issue ther. Has anyone seen this ?
I have a spreadsheets that has 2 combobox on it. I have a bit of code
to clear both of them when the spreadsheet is first open:
Set fSheet = Worksheets("Main")
Set fBookCombobox = fSheet.OLEObjects("A")
Set fCurrencyCombobox = fSheet.OLEObjects("B")
Call fBookCombobox.Object.Clear
Call fCurrencyCombobox.Object.Clear
and it works fine in excel 2000. When I open the same spreadsheet in
excel xp, I am getting "Run-time error '1004' unable to get teh object
property of the OLEobject class' at the 'Call
fBookCombobox.Object.Clear' line. In the Local window, Combobox named
'A' indeed is not there but 'B' is.
If I open the file in XP with macro disabled, save it and reopen in XP
again, the code works. But the down side is I gets the same error at
the same line when I now open the file in excel 2000. It looks like
there are some incompatibility issue ther. Has anyone seen this ?