Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel VBA change button size and location

How do I change a button size and location on an excel sheet?

like image 760
Steven Avatar asked Dec 28 '22 11:12

Steven


1 Answers

You are almost there with ActiveSheet.Shapes("Button 1")

If you dim a variable as Shape and assign the button to it, you can use intellisence to explore the available properties. From there you will find .Height, .Width, .Left, .Top

Dim btn As Shape
Set btn = ActiveSheet.Shapes("Button 1")
btn.Height = 50
btn.Width = 100
like image 198
chris neilsen Avatar answered Dec 30 '22 10:12

chris neilsen