riteoh01
03-07-2012, 04:01 PM
Hi,
I'm using the following code to create and name a rectangle shape on my workbook :
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 736.25, 330#, 97.25, 63#).Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 65
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
With Selection
.Name = ButtonHide
End With
The problem I'm now coming up against, is trying to delete this same shape with another macro.
I'm no VBA expert - I simply learn off others, and what I can read on the net - so have I named the shape correctly, and if I have, how do I delete this named shape?
Any help appreciated.
I'm using the following code to create and name a rectangle shape on my workbook :
ActiveSheet.Shapes.AddShape(msoShapeRectangle, 736.25, 330#, 97.25, 63#).Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 65
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
With Selection
.Name = ButtonHide
End With
The problem I'm now coming up against, is trying to delete this same shape with another macro.
I'm no VBA expert - I simply learn off others, and what I can read on the net - so have I named the shape correctly, and if I have, how do I delete this named shape?
Any help appreciated.