Hi,

I'm trying to implement application event procedures.
I've inserted a class module etc like decribed on the
www.mvps.org/word/faqs/MacrosVBA/appClassEvenstContent.htm website.

It works fine until I end a macro by the "End" statement. Why ?

I added a watch for my oAppClass object
It exist until I run the "End" statement, then its reporting "object
variable or with block variablel not set"
I work with Word Xp on a Win Xp prof. station.

Any suggestions ?

Thanks

Bart Hernalsteen

Re: Application Events by mksmith

mksmith
Wed Sep 17 05:33:20 CDT 2003

Why are you using an 'End' statement? There is no real reason to use
this statement and when you get to writing compiled code, i.e. VB, the End
statement causes no end of problems.

Basically, don't use it to stop execution. Let the code run out of scope.

Malc
www.dragondrop.com

Re: Application Events by Klaus

Klaus
Wed Sep 17 08:50:55 CDT 2003

I think you could use "Exit Sub" instead. There was an endless (sic) thread
about "End" in one of the VBA groups last year...

Klaus


<mksmith@cix.compulink.co.uk> wrote:
> Why are you using an 'End' statement? There is no real reason
> to use this statement and when you get to writing compiled code,
> i.e. VB, the End statement causes no end of problems.
>
> Basically, don't use it to stop execution. Let the code run out
> of scope.
>
> Malc
> www.dragondrop.com