Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I know that:
Set Mycmd = Controls.Add("MSForms.CommandButton.1") ', CommandButton2, Visible) will add a control to a form what would the code be to add a control to a worksheet? (are there any tricks I will need to do to make it functional (de-activate / activate worksheet...)) thanks in advance mark |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When in doubt, record a macro that does what your trying to accomplish, then
edit the code to suit your needs, great way to learn and help you remember long forgotten functionality. This is what recorded when I added a button. Can't get much better. ActiveSheet.OLEObjects.Add(ClassType:="Forms.Comma ndButton.1", Link:=False _ , DisplayAsIcon:=False, Left:=79.5, Top:=135.75, Width:=64.5, Height _ :=25.5).Select -John "mark kubicki" wrote: I know that: Set Mycmd = Controls.Add("MSForms.CommandButton.1") ', CommandButton2, Visible) will add a control to a form what would the code be to add a control to a worksheet? (are there any tricks I will need to do to make it functional (de-activate / activate worksheet...)) thanks in advance mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
c# code to add button control to the worksheet!!!! | Excel Programming | |||
Reference to ActiveX control on worksheet requires full worksheet name | Excel Programming | |||
Design Best Practices: Form Control Code in Worksheet or Module | Excel Programming | |||
Changing control properties/code through code | Excel Programming | |||
can you control SAP with VBA code? | Excel Programming |