make button - assign to cell

  • Thread starter Thread starter tegger
  • Start date Start date
T

tegger

Is it possible to programatically make a button and assign its location to a
specific cell or cells?
 
slip of the key on the last one, sorry.
To add a button to a sheet programmatically you can use

Set btn = ActiveChart.Shapes.AddFormControl _
(xlButtonControl, 35, 10, 30, 15)

where the numbers are position left, position top, width
and height. To locate it on a particular cell you'll need
to set these parameters to the right values.

jacob
 
Thanks for your help.



jacob said:
slip of the key on the last one, sorry.
To add a button to a sheet programmatically you can use

Set btn = ActiveChart.Shapes.AddFormControl _
(xlButtonControl, 35, 10, 30, 15)

where the numbers are position left, position top, width
and height. To locate it on a particular cell you'll need
to set these parameters to the right values.

jacob
 
Back
Top