Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to be able to set the location of a command button on an Excel
worksheet with macro code. Can that be done? Thanks for your help, Jim Walsh |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim myRng As Range
Dim myCmdBtn As OLEObject Set myRng = Worksheets("Sheet1").Range("c9") '"C9:d10" ??? With myRng Set myCmdBtn = .Parent.OLEObjects.Add _ (ClassType:="Forms.CommandButton.1", _ Link:=False, _ DisplayAsIcon:=False, _ Left:=.Left, _ Top:=.Top, _ Width:=.Width, _ Height:=.Height) End With myCmdBtn.Object.Caption = "Click Me" jswalsh33 wrote: I would like to be able to set the location of a command button on an Excel worksheet with macro code. Can that be done? Thanks for your help, Jim Walsh -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
print command from command button in userform causes double chart | Excel Programming | |||
Deselect Command Button by Selecting another Command Button | Excel Programming | |||
Macro based on command button location? | Excel Programming | |||
Macro based on command button location? | Excel Programming | |||
VB's Command Button vs Form's Command Button | Excel Programming |