Sub Create_Easy_Button(x As Integer, Y As Integer, sMacro As String)
With ActiveSheet.Shapes.AddShape(msoShapeOval, x, Y, 35, 35)
.Name = "Easy_Button_Base"
.Fill.ForeColor.RGB = RGB(200, 0, 0)
.Placement = xlFreeFloating
.OnAction = "Show_Prompt"
With .Line
.ForeColor.RGB = RGB(255, 255, 255)
.Weight = 3
End With
With .Shadow
.Visible = True
.OffsetX = 2
.OffsetY = 2
.Transparency = 0.5
.ForeColor.RGB = RGB(10, 10, 10)
End With
With .ThreeD
.BevelTopType = 3
.BevelTopDepth = 20
.BevelTopInset = 19
.ContourWidth = 0
.Depth = 2
.ExtrusionColorType = 1
.FieldOfView = 45
.LightAngle = 300
.Perspective = 0
.PresetLighting = 15
.PresetMaterial = 6
End With
End With
With ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, x - 1, Y - 2, 35, 35)
.Name = "Easy_Button_Text"
With .TextFrame
.MarginBottom = 0
.MarginLeft = 0
.MarginRight = 0
.MarginTop = 0
.HorizontalAlignment = xlHAlignCenter
.VerticalAlignment = xlVAlignCenter
.Characters.Text = "easy"
With .Characters.Font
.Bold = True
.Size = 16
.Name = "Calibri"
.Color = RGB(255, 255, 255)
.Shadow = True
End With
End With
.Line.Visible = False
.Fill.Visible = False
.TextEffect.PresetTextEffect = 2
.Placement = xlFreeFloating
.OnAction = sMacro
End With
End Sub
|