Version compability of classes?

  • Thread starter Thread starter aGraham
  • Start date Start date
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?
 
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 *
 
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-
()_)¯()_) ¯¯¯¯¯ )_)
 
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-
()_)¯()_) ¯¯¯¯¯ )_)
 
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-
()_)¯()_) ¯¯¯¯¯ )_)
 
hmmmm.. that seems to work fine. I will have to take a closer look at
it.
 
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...
 
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....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top