E
Eric
Can I access a form in another (global) .dot file somehow?
/e
/e
Can I access a form in another (global) .dot file somehow?
Hi!
I have a general form I'd like to put in a dot-file so I can access
from other .dot files. A regular Userform.
Jean-Guy Marcil said:Eric was telling us:
Eric nous racontait que :
If it is stored in a global template, then the easiest is to have a Sub to
instantiate that userform in the global template. Then, just call that Sub
from your other templates. In the calling templates, from the VBA editor,
use the Tool > References menu to set a reference to your global template.
In the global template, have a sub like this:
'_______________________________________
Public Sub CreateForm()
Dim newForm As myFrm
Set newForm = New myFrm
newForm.Show
'do some stuff
Unload newForm
Set newForm = Nothing
End Sub
'_______________________________________
If the global template project is called GlobalTest and the Sub that hold
the code above is called CallForm, then in your other templates, the ones
with the reference to the global one, use a call such as:
GlobalTest.CallForm.CreateForm
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org