Desu Nota from Columbus
Well-known Member
- Joined
- Mar 17, 2011
- Messages
- 556
I have a two step process that I now have working perfectly thanks to various resources and people on this forum. Awesome.
Now I want to make it esthetically pleasing and simple for my co-workers to use.
I tried various ways of recording/writing code to add a button which when clicked runs a macro (fail).
I would like the button to be added to worksheet "Results" and fit in Column D (column width = 18) at rows 5+6 (row height combined = 25).
I am not sure if you place a button based on columns/rows or by some other means so I will add my recorded macro just in case reference is needed.
Now I want to make it esthetically pleasing and simple for my co-workers to use.
I tried various ways of recording/writing code to add a button which when clicked runs a macro (fail).
I would like the button to be added to worksheet "Results" and fit in Column D (column width = 18) at rows 5+6 (row height combined = 25).
I am not sure if you place a button based on columns/rows or by some other means so I will add my recorded macro just in case reference is needed.
Code:
Range("D5").Select
Application.CommandBars("Formatting").Controls.Add Type:=msoControlButton, _
ID:=282, Before:=14
ActiveSheet.Buttons.Add(149.25, 52.5, 89.25, 24.75).Select
Selection.OnAction = "PERSONAL.XLS!ATest2A"
ActiveSheet.Shapes("Button 1").Select
Selection.Characters.Text = "Get Downtime Data"
With Selection.Characters(Start:=1, Length:=17).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.ShapeRange.ScaleWidth 1.43, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.45, msoFalse, msoScaleFromTopLeft
Range("E10").Select