Connecting userforms to buttons in Excel

  • Thread starter Sören_Marodören
  • Start date
S

Sören_Marodören

I want to define a button in Excel (close to the bold- and italic-buttons)
that opens a userform that I have done. (In this userform I can do some
settings before I press the OK-button to start the VBA-macro thats does the
work.)

I know how to connect a button to a VBA-macro, but not how to connect it to
a userform.

Best regards,
/Sören
 
J

Jim Cone

Create a macro to call the form and run the macro from your button...
'--
Sub ConnectToUserForm()
UserForm1.Show
End Sub
'--

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Sören_Marodören"
wrote in message
I want to define a button in Excel (close to the bold- and italic-buttons)
that opens a userform that I have done. (In this userform I can do some
settings before I press the OK-button to start the VBA-macro thats does the
work.)
I know how to connect a button to a VBA-macro, but not how to connect it to
a userform.
Best regards,
/Sören
 

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