T
thomas.b.mann
New to VBA in Word.
I have a simple form that I want to pop up when the user opens a
document. When the user does something there and clicks a 'submit'
button I want the document to open. Simple right?
So far I have:
In module AutoExec:
Sub Main()
Load UserForm1
UserForm1.Show
End Sub
In the click event for a button on UserForm1 I have this (for
simplicity let's assume the button does nothing else but I just want
to proceed with opening the document):
Private Sub btnSubmit_Click()
Me.Hide
ThisDocument.Activate
End Sub
This is apparently not correct. I have tried a few other things such
as:
Load ThisDocument
Unload Me
This must be something simple. Any help?
I have a simple form that I want to pop up when the user opens a
document. When the user does something there and clicks a 'submit'
button I want the document to open. Simple right?
So far I have:
In module AutoExec:
Sub Main()
Load UserForm1
UserForm1.Show
End Sub
In the click event for a button on UserForm1 I have this (for
simplicity let's assume the button does nothing else but I just want
to proceed with opening the document):
Private Sub btnSubmit_Click()
Me.Hide
ThisDocument.Activate
End Sub
This is apparently not correct. I have tried a few other things such
as:
Load ThisDocument
Unload Me
This must be something simple. Any help?