Version compability of classes?

A

aGraham

I have a spreadsheet that has a class that uses the withEvents keyword.
It seems that if I compile & save the file in Excel 2000, it will work
in Excel XP, but If I compile & save the file in Excel XP then the
events never get called when the spreadsheet is used in Excel 2000. It
seems that the code generated in XP is not compatible with 2000. Has
anyone else seen this?
 
R

Rob Bovey

A WithEvents class in general should work fine in Excel 2000. What
object's events are you trying to sink with your class?

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 
A

aGraham

sorry took so long to respond, forgot to check this group....

They work fine as long as the file was saved in excel 2000, as soon as
the file is saved by XP the events do not get handled in 2000.


Rob Bovey said:
A WithEvents class in general should work fine in Excel 2000. What
object's events are you trying to sink with your class?

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


aGraham said:
I have a spreadsheet that has a class that uses the withEvents keyword.
It seems that if I compile & save the file in Excel 2000, it will work
in Excel XP, but If I compile & save the file in Excel XP then the
events never get called when the spreadsheet is used in Excel 2000. It
seems that the code generated in XP is not compatible with 2000. Has
anyone else seen this?

--
o_o_o_o
/| ,[_____],
|¯¯¯L --O|||||||O-
()_)¯()_) ¯¯¯¯¯ )_)
 
R

Rob Bovey

aGraham said:
sorry took so long to respond, forgot to check this group....

They work fine as long as the file was saved in excel 2000, as soon as
the file is saved by XP the events do not get handled in 2000.

I can't reproduce this problem with any Excel objects using the
computers on my network. What is the object whose events you are trying to
trap?

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


aGraham said:
sorry took so long to respond, forgot to check this group....

They work fine as long as the file was saved in excel 2000, as soon as
the file is saved by XP the events do not get handled in 2000.


Rob Bovey said:
A WithEvents class in general should work fine in Excel 2000. What
object's events are you trying to sink with your class?

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


aGraham said:
I have a spreadsheet that has a class that uses the withEvents keyword.
It seems that if I compile & save the file in Excel 2000, it will work
in Excel XP, but If I compile & save the file in Excel XP then the
events never get called when the spreadsheet is used in Excel 2000. It
seems that the code generated in XP is not compatible with 2000. Has
anyone else seen this?

--
o_o_o_o
/| ,[_____],
|¯¯¯L --O|||||||O-
()_)¯()_) ¯¯¯¯¯ )_)

--
o_o_o_o
/| ,[_____],
|¯¯¯L --O|||||||O-
()_)¯()_) ¯¯¯¯¯ )_)
 
A

Aaron Graham

It is the App_WorkbookOpen event. I will try to make a smaller test
case that I can send you if I get time.

Rob Bovey said:
aGraham said:
sorry took so long to respond, forgot to check this group....

They work fine as long as the file was saved in excel 2000, as soon as
the file is saved by XP the events do not get handled in 2000.

I can't reproduce this problem with any Excel objects using the
computers on my network. What is the object whose events you are trying to
trap?

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


aGraham said:
sorry took so long to respond, forgot to check this group....

They work fine as long as the file was saved in excel 2000, as soon as
the file is saved by XP the events do not get handled in 2000.


Rob Bovey said:
A WithEvents class in general should work fine in Excel 2000. What
object's events are you trying to sink with your class?

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


I have a spreadsheet that has a class that uses the withEvents keyword.
It seems that if I compile & save the file in Excel 2000, it will work
in Excel XP, but If I compile & save the file in Excel XP then the
events never get called when the spreadsheet is used in Excel 2000. It
seems that the code generated in XP is not compatible with 2000. Has
anyone else seen this?

--
o_o_o_o
/| ,[_____],
|¯¯¯L --O|||||||O-
()_)¯()_) ¯¯¯¯¯ )_)

--
o_o_o_o
/| ,[_____],
|¯¯¯L --O|||||||O-
()_)¯()_) ¯¯¯¯¯ )_)
 
A

aGraham

I think I may have found the issue..

1.) my wb with the event code(CodeBook) was being opened by another
WB(MasterWB) using Workbooks.open
2.) CodeBook was creating my object to handle the events in the
Workbook_open event.
3.) MasterWB was not calling RunAutoMacros after CodeBook was opened.

I haven't tested this but I am getting ready to...
 
A

aGraham

out of time to look at this will have to look at it more in the future,
but atleast now I have a work around, making sure I compile it in 2000
before shipping....
 
Top