Toolbar button for Userform?

I

Ithaca

I'm trying to create a custom button to call a macro that runs via userform
but have been unsuccessful. I can create a button to call the related macro
but I need the actual userform to be called. is there a way to do this?

Also, is there a way to distribute this button to others that may need it?
Or will I have to create it on each computer individually?

Thanks in advance for any help!

-Ithaca
 
D

Doug Robbins - Word MVP

To get the userform to be displayed, you need to have your button run a
macro that contains code of the following form:

Dim MyDlg As MyUserForm
Set MyDlg = New MyUserForm
MyDlg.Show
Set MyDlg = Nothing

Where MyUserForm is the name assigned to your UserForm.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
I

Ithaca

Thanks a lot Doug! That works perfectly.

I want to set up this macro and custom button on multiple users computers
here at work so is there an easier way than manually doing so to each
computer?
 
I

Ithaca

so if I create a new template I can just email it and copy it to the user's
Word startup file? and my buttons and everything will be there??
 
J

Jay Freedman

Right. The hardest part is getting the user to put the file in the
correct folder. Since it's marked as a hidden folder, most people need
to be shown how to set Windows Explorer to let them see it.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
I

Ithaca

Ha! I think I'll be setting it up since it's only like five computers...
Eliminate at least some of the error in the process, but there's no way to
eliminate my own errors :D

Thanks Jay and Doug!!!
 

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