Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word, opening userform

Status
Not open for further replies.

petermeachem

Programmer
Aug 26, 2000
2,270
GB
This is driving me demented. I know it must be easy but I'm blowed if I can work out how to do it.

I have a template word file that contains a userform. This is going to be copied to everyones Office Startup folder when I get it working. I want to show this form when a new toolbar button is clicked. I have added the toolbar button but I just can't get the button to open the form.

I imagine it is something to do with the macro being in normal.dot and the form in Project formtemplate.
Whatever variation in UserForm1.show I put in the toolbar button macro I get 'Object required Error 424'.

Could someone put me out of my misery please?
 
Opening (Show) a userform IS easy. If Userform.Show returns that error, then is a matter of Scope.

"I imagine it is something to do with the macro being in normal.dot and the form in Project formtemplate."

Indeed. This is SCOPE.

If the macro is in normal.dot, how is "This is going to be copied to everyones Office Startup folder when I get it working. " going to do anything?

So put the macro in the template.

faq219-2884

Gerry
My paintings and sculpture
 
Right got it. The other thing I wasn't doing was not opening the word template by right clicking and opening.

Thanks very much.

It's only easy if you have done it before. I've never had to do any Word programming before and it isn't at all obvious.
 
opening the word template by right clicking and opening. "

This is not the proper way to use templates (.dot files).

"It's only easy if you have done it before. "

But you knew that .Show was how you open a userform.

"Whatever variation in UserForm1.show I put in the toolbar button macro I get 'Object required Error 424'."

And it is, whether it is Word or anything else. The problem you had is not related to Word itself whatsoever. The fact you have little experience with Word programming is not relevant, as again, it has nothing to do with Word.

Scope applies to all programming.

Glad you have it worked out though.

faq219-2884

Gerry
My paintings and sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top