ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Version compability of classes? (https://www.excelbanter.com/excel-programming/297968-version-compability-classes.html)

aGraham

Version compability of classes?
 
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-
()_)Ż()_) ŻŻŻŻŻ )_)

Rob Bovey

Version compability of classes?
 

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" wrote in message
...
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

Version compability of classes?
 
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.


In article ,
"Rob Bovey" wrote:

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" wrote in message
...
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-
()_)Ż()_) ŻŻŻŻŻ )_)

Rob Bovey

Version compability of classes?
 
"aGraham" wrote in message
...
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" wrote in message
...
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.


In article ,
"Rob Bovey" wrote:

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" wrote in message
...
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-
()_)Ż()_) ŻŻŻŻŻ )_)




Aaron Graham

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

In article ,
"Rob Bovey" wrote:

"aGraham" wrote in message
...
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" wrote in message
...
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.


In article ,
"Rob Bovey" wrote:

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" wrote in message
...
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-
()_)Ż()_) ŻŻŻŻŻ )_)




aGraham

Version compability of classes?
 
hmmmm.. that seems to work fine. I will have to take a closer look at
it.

In article ,
"Rob Bovey" wrote:

"Aaron Graham" wrote in message
...
It is the App_WorkbookOpen event. I will try to make a smaller test
case that I can send you if I get time.


I've attached a sample Application event handler that I created in Excel
2002. It works correctly in all versions of Excel from 97 onward here.


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

aGraham

Version compability of classes?
 
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...

In article ,
"Rob Bovey" wrote:

"Aaron Graham" wrote in message
...
It is the App_WorkbookOpen event. I will try to make a smaller test
case that I can send you if I get time.


I've attached a sample Application event handler that I created in Excel
2002. It works correctly in all versions of Excel from 97 onward here.


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

aGraham

Version compability of classes?
 
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....

In article ,
aGraham wrote:

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...

In article ,
"Rob Bovey" wrote:

"Aaron Graham" wrote in message
...
It is the App_WorkbookOpen event. I will try to make a smaller test
case that I can send you if I get time.


I've attached a sample Application event handler that I created in Excel
2002. It works correctly in all versions of Excel from 97 onward here.


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


All times are GMT +1. The time now is 06:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com