Russ
Sun Oct 21 13:42:24 PDT 2007
AnnieB,
It would be helpful if you could show us the exact line where the error
occurs. And then show us that line and its short surrounding (which event,
if on a userform) subroutine.
It may be that it is referring to a bookmark or form field or AutoText or
some other named or numbered item in a collection, in your document, that
you have not yet established or misnamed (typo?) in reference.
---------------
Some typos can be caught if you always use:
Option Explicit
in the (Declarations) section of each of your projects.
Then, the compiler forces you to correctly spell or declare a variable
before using it.
See this webpage for more information on declaring variables:
http://word.mvps.org/faqs/macrosvba/DeclareVariables.htm
----------------
In your post title you mention Autonew, while in the message body you use
Document_New. They are different, but related events.
See this webpage for more information on document events:
http://word.mvps.org/faqs/macrosvba/DocumentEvents.htm
> G'Day all!
>
> Can someone please tell me why the following would suddenly stop running?
>
> Private Sub Document_New()
> UserForm1.Show
> End Sub
>
> I have created UserForm1 in my template and the form was loading correctly
> on opening a new document based on that template. I have since edited the
> fields on UserForm1 but the name is unchanged.
>
> I am now getting:
>
> Run-time Error '5941':
> The requested member of the collection does not exist
>
> Any suggestions gratefully received!
--
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID