Saturday, 15 August 2015

vba - copying activex controls along with the macros -


Is it possible to copy an ActiveX control into a separate worksheet with the macro associated with it?

Thanks

code to copy a form button < Pre> activesheet.buttons ("button1") copy sheets ("Sheet1"). Category ("A1"). Pastepellel

Or you can make a new one using the buttons. Add

  Set the worksheet as a dim rTarget range set = Sheets ("Sheet 1") Set rTarget = ws.Range ("A1") ws.Buttons.Add (Left: = rTarget.Left, Top: = Rtarget.Top, width: = rTarget.Width, Height: = rTarget.Height) .caption = "some text" .exe = "some_macro" with end  < / Pre> 

Finally, just copy the border should work until the application.copyobjectswithcells is set to false

No comments:

Post a Comment