I have several macros and functions that are using ActiveSheet.... and want to replace ActiveSheet... with myActiveSheet. But I always get either compile- or runtime errors.
Please Login or Register to view this content.
I have several macros and functions that are using ActiveSheet.... and want to replace ActiveSheet... with myActiveSheet. But I always get either compile- or runtime errors.
Please Login or Register to view this content.
Add this code to your macro's under the declarations.
Please Login or Register to view this content.
Click the * Add Reputation below to say thanks.
"Basis Depot" is just a sample value for the createTestSheet function which creates a working copy of this and activates the working copy. The createTestSheet function is placed in my .xlam workbook. The createTestSheet function returns the ActiveSheet "Public Function createTestSheet(Optional myTestSheet As String) As Worksheet" which should be stored in the variable myActiveSheet of the calling macro and should be used in the rest of the local macros.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks