Hi
the following code is producing a "compile error - automation error".
Any help would be appreciated
the following code is producing a "compile error - automation error".
Any help would be appreciated
Code:
Public Sub addmilestone(shapeleft As Integer, shapetop As Integer, shapeheight As Integer, shapewidth As Integer, shapecolor As Long, shapetype As MsoAutoShapeType) ActiveSheet.Shapes.AddShape(shapetype, shapeleft, shapetop, shapeheight, shapewidth).Select
With Selection
.ShapeRange.Line.Visible = msoFalse
.Name = myscript & "." & shapecount
.ShapeRange.TextFrame.MarginLeft = 0#
.ShapeRange.TextFrame.MarginRight = 0#
.ShapeRange.TextFrame.MarginTop = 0#
.ShapeRange.TextFrame.MarginBottom = 0#
.ShapeRange.Fill.Visible = msoTrue
.ShapeRange.Fill.ForeColor.RGB = shapecolor
.Placement = xlFreeFloating
End With
shapearray(shapecount) = Selection.Name
shapecount = shapecount + 1
End Sub