ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   attach userform to button (https://www.excelbanter.com/excel-programming/427344-attach-userform-button.html)

Darrell_Sarrasin via OfficeKB.com

attach userform to button
 
I have this with statement

With Sheets("Agent Summary")
ActiveSheet.OLEObjects.Add(ClassType:="Forms.Comma ndButton.1", Link:=False
_
, DisplayAsIcon:=False, Left:=1.5, Top:=1, Width:=95.25, Height:= _
24.75).Select

Sheets("Agent Summary").CommandButton1.Caption = "Command Box"

End With

I want to attach a userform to the botton whe it creates teh button meaning I
want the button to open a userform when its clicked after the button is
created. Can I get help please?

--
Message posted via http://www.officekb.com



All times are GMT +1. The time now is 01:28 AM.

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