P
Paul J
I have created a Word 2003 template (a business form) containing macros. It
is entirely possible for a User to launch more than one instance of the
template at the same time thus creating Doument1, Document2, etc.
Whereas I want to share (the values of) specific variables between the
macros and functions of a Module, I do not want these values shared between
instances of the macros related to different documents.
The following example illustrates the main problem:
Option Explicit '
Static Sub upTst() ' Assigned to Alt+/
Dim Count As Integer ' Value to be retained between uses
Count = Count + 1 '
StatusBar = Count ' Show us what it is
End Sub '
Pressing Alt+/ on either Document1 or Document2 (created from the Word
template holding the above macro) will display the same incremented value -
not their own version of it.
All offers of advice will be gratefully received.
Paul J
is entirely possible for a User to launch more than one instance of the
template at the same time thus creating Doument1, Document2, etc.
Whereas I want to share (the values of) specific variables between the
macros and functions of a Module, I do not want these values shared between
instances of the macros related to different documents.
The following example illustrates the main problem:
Option Explicit '
Static Sub upTst() ' Assigned to Alt+/
Dim Count As Integer ' Value to be retained between uses
Count = Count + 1 '
StatusBar = Count ' Show us what it is
End Sub '
Pressing Alt+/ on either Document1 or Document2 (created from the Word
template holding the above macro) will display the same incremented value -
not their own version of it.
All offers of advice will be gratefully received.
Paul J