ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Connecting userforms to buttons in Excel (https://www.excelbanter.com/excel-programming/404234-connecting-userforms-buttons-excel.html)

Sören_Marodören

Connecting userforms to buttons in Excel
 
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

Jim Cone

Connecting userforms to buttons in Excel
 

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



All times are GMT +1. The time now is 01:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com