I'm reverse engineering a macro developed for me by an SA consultant who is long gone. The code works, but I want to clean it up by removing some extraneous subroutines, documenting it and putting it into production.
In stepping through the autoexec module the following code is executed, but not called from anywhere.
Private Sub Class_Initialize()
Set App = Application
Private Sub Class_Terminate()
Set App = Nothing
I'm guessing these are events, but I don't know how they are being initiated. They are not documented in the SA VBA help guide, but this wouldn't be the first time that an SA "feature" isn't documented. or they could be VBA events. I don't now what "class" cause these events to be raised.
Anyone have an idea of what's going on?
SystemAdmin 110000D4XK1061 Posts
Re: SA or VBA Event2012-10-03T12:45:25ZThis is the accepted answer. This is the accepted answer.You can always comment them out and see if something breaks. Not sure what the 'menu' call is doing all by itself. Check the other modules to see if those calls are used, other than that - they kind of look harmless.
ArifH 2700020US430 Posts
Re: SA or VBA Event2012-10-03T13:20:41ZThis is the accepted answer. This is the accepted answer.Mentioned here
but does not give much information.
Same information appears in older documents.
TerryMoriarty 2700024KJP126 Posts
Re: SA or VBA Event2012-10-03T18:14:37ZThis is the accepted answer. This is the accepted answer.Found out from the SA linkedIn group that these are VBA events. They appear to be invoked when the EventHandler is created. I'm thinking of moving the call for the menu subroutine to the Startup event. or just make the call directly from the Main subroutine.