G'day "Bob McCormick" <rmc1357@twcny.rr.com>,
In order to show a userform at startup, like you are, you need to
delay the execution of the code with an ONTIME command
Eg
Sub autoopen()
Application.OnTime When:=Now + TimeValue("00:00:15"), _
Name:="ShowForm"
end sub
sub showform()
UserForm1.Show
end sub
Steve Hudson - Word Heretic
steve from wordheretic.com (Email replies require payment)
Without prejudice
Bob McCormick reckoned:
>I read Doug Robbins article
>http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
[quoted text clipped - 51 lines]
>
>Bob McCormick
Bob McCormick - 18 Mar 2005 22:27 GMT
Thanks for your response, Heritic
I tried your suggestion but still get the same Runtime error.
It's like VBA runs into the userform object reference in the autoopen macro
and can't find it in the document.
How do I make certain the autoopen macro has the information it needs to
find UserForm1.
I'm new to VBA in Word, but it seems like there must be something fairly
obvious missing. I just don't have enough experience to know what it is.
Thanks,
Bob McCormick
> G'day "Bob McCormick" <rmc1357@twcny.rr.com>,
>
[quoted text clipped - 16 lines]
> steve from wordheretic.com (Email replies require payment)
> Without prejudice
Word Heretic - 25 Mar 2005 08:32 GMT
G'day Word Heretic <myfullname@tpg.com.au>,
Ok, I see now - you are all mucked up
UserForm1 is the actual module name of the form right?
So
Dim MyForm as UserForm1
Set MyForm = New UserForm1
Myform.show
Unload Myform 'better than set = nothing for forms as ensures
'special events, win handlers etc dropped
Steve Hudson - Word Heretic
steve from wordheretic.com (Email replies require payment)
Without prejudice
Word Heretic reckoned:
>G'day "Bob McCormick" <rmc1357@twcny.rr.com>,
>
[quoted text clipped - 74 lines]
>>
>>Bob McCormick
I forgot to mention I'm using Word 2K
>I read Doug Robbins article
>http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm
[quoted text clipped - 52 lines]
>
> Bob McCormick