attach userform to button

  • Thread starter Darrell_Sarrasin via OfficeKB.com
  • Start date
D

Darrell_Sarrasin via OfficeKB.com

I have this with statement

With Sheets("Agent Summary")
ActiveSheet.OLEObjects.Add(ClassType:="Forms.CommandButton.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?
 

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