runtime error with autonew

K

Katherine

This is driving me slowly insane. I'm using autonew to show my userform when a new document is created from the template. So..

sub autonew()
frmFish4.show
end sub

Looks about right to me. But i'm getting a 'runtime-error 424: object required' every time it runs. I've checked for typos. i've checked that my userform is actually called frmFish4. i've also done a technet search for the error code only to find that all the results are frustratingly vague.

Is there something obvious that i've overlooked? I thought perhaps it didnt like having a number in the form name, but i get the same error even after changing the name. I get the impression i'm being a bit thick here....can anyone point me in the right direction?

Any and all suggestions gratefully received ;)
 
D

Doug Robbins - Word MVP

Look in the Initialize() or Activate() events of the userform. There may be
a problem with the code there.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
Katherine said:
This is driving me slowly insane. I'm using autonew to show my userform
when a new document is created from the template. So..
sub autonew()
frmFish4.show
end sub

Looks about right to me. But i'm getting a 'runtime-error 424: object
required' every time it runs. I've checked for typos. i've checked that my
userform is actually called frmFish4. i've also done a technet search for
the error code only to find that all the results are frustratingly vague.
Is there something obvious that i've overlooked? I thought perhaps it
didnt like having a number in the form name, but i get the same error even
after changing the name. I get the impression i'm being a bit thick
here....can anyone point me in the right direction?
 
J

Jezebel

Click within the AutoNew macro, then press F8 repeatedly to step through the
code line by line until you meet the error. Either you are, after all,
mistaken about the form name, or the problem is within the form code itself.




Katherine said:
This is driving me slowly insane. I'm using autonew to show my userform
when a new document is created from the template. So..
sub autonew()
frmFish4.show
end sub

Looks about right to me. But i'm getting a 'runtime-error 424: object
required' every time it runs. I've checked for typos. i've checked that my
userform is actually called frmFish4. i've also done a technet search for
the error code only to find that all the results are frustratingly vague.
Is there something obvious that i've overlooked? I thought perhaps it
didnt like having a number in the form name, but i get the same error even
after changing the name. I get the impression i'm being a bit thick
here....can anyone point me in the right direction?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top