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?
This topic has been locked.
3 replies Latest Post - 2012-10-03T18:14:37Z by TerryMoriarty
Pinned topic SA or VBA Event
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-10-03T18:14:37Z at 2012-10-03T18:14:37Z by TerryMoriarty
SystemAdmin 110000D4XK1061 PostsACCEPTED ANSWER
Re: SA or VBA Event2012-10-03T12:45:25Z in response to TerryMoriartyYou 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 PostsACCEPTED ANSWER
Re: SA or VBA Event2012-10-03T13:20:41Z in response to TerryMoriartyMentioned here
but does not give much information.
Same information appears in older documents.
TerryMoriarty 2700024KJP126 PostsACCEPTED ANSWER
Re: SA or VBA Event2012-10-03T18:14:37Z in response to TerryMoriartyFound 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.