Private Sub Create_2312_ICT_TD_toPivot_Button()
Dim btn As Shape
Sheets("Insert").Select
[COLOR="green"]' Creates rectangle [/COLOR]
Set btn127 = ActiveSheet.Shapes.AddShape _
(msoShapeRectangle, 10, 10, 95.76, 18)
btn.Fill.ForeColor.RGB = RGB(0, 51, 102)
[COLOR="green"]' Moves the button to cell E2 [/COLOR]
btn.Select
Selection.Cut
Range("E2").Select
ActiveSheet.Paste
[COLOR="green"]' Assigns a macro action to the button[/COLOR]
With Selection
.Caption = "View Pivot Table"
.Font.Color = RGB(255, 255, 255)
.Font.FontStyle = "Bold"
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.OnAction = "Action127" [COLOR="Green"]'This is another macro I have coded[/COLOR]
End With
Range("A1").Select
End Sub