Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default combobox missing between excel 2000 and xp

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 ?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default combobox missing between excel 2000 and xp

Have you tried it without the "Call" statements?

Jim Cone
San Francisco, CA

"Dickson Law" wrote in message om...
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 ?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default combobox missing between excel 2000 and xp

Hi Jim

Do you mean commenting the two call statement completely? Tried that,
but got the same results. The problem seems to be the object has
disappeard from the sheet "Main". So whenever I tried to do anything
to the object I get the same error.

Thanks

dickson

"Jim Cone" wrote in message ...
Have you tried it without the "Call" statements?

Jim Cone
San Francisco, CA

"Dickson Law" wrote in message om...
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 ?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default combobox missing between excel 2000 and xp

Dickson,

Well that eliminates bad code as the reason.
Sorry, I don't know why the combobox would be missing.
I was referring to removing the word "Call" from
in front of the two statements. "Call" is normally used to
start (transfer control to) another procedure.

Regards,
Jim Cone
San Francisco, CA

"Dickson Law" wrote in message om...
Hi Jim
Do you mean commenting the two call statement completely? Tried that,
but got the same results. The problem seems to be the object has
disappeard from the sheet "Main". So whenever I tried to do anything
to the object I get the same error.
Thanks
dickson


"Jim Cone" wrote in message ...
Have you tried it without the "Call" statements?

Jim Cone
San Francisco, CA

- snip -
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing OLEDB drivers in Excel 2000 (9.0.28.12) Missing OLEDB drivers Blank OLAP Provide Excel Discussion (Misc queries) 1 March 12th 09 09:42 PM
Missing drawing toolbar in Excel 2000 Ken Roberts Excel Discussion (Misc queries) 2 February 14th 06 04:10 PM
missing close box in excel 2000 dmtech Excel Discussion (Misc queries) 0 September 22nd 05 02:50 PM
Excel 2000 ComboBox Code Change event Matt. Excel Programming 3 July 28th 03 03:29 PM
Excel 2000 VBA Form Combobox value Matt. Excel Programming 2 July 25th 03 06:37 PM


All times are GMT +1. The time now is 07:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"