Hi All
I am trying to code an excel sheet whereby the code will add a watermark/shape, save the document, and then I need it to remove the watermark/shape.
So far I have the following code to add the watermark/shape
However I am unable to remove it, I thought this would do it:
I keep getting a runtime error 424, object required error. I guess I am missing something obvious, any suggestions?
Thanks
I am trying to code an excel sheet whereby the code will add a watermark/shape, save the document, and then I need it to remove the watermark/shape.
So far I have the following code to add the watermark/shape
Code:
With ActiveSheet.Shapes.AddTextEffect(msoTextEffect1, "Draft", _
"Arial Black", 72#, msoFalse, msoFalse, _
10, 10)
.ScaleWidth 1, msoFalse, msoScaleFromTopLeft
.ScaleHeight 1, msoFalse, msoScaleFromBottomRight
.Fill.Visible = msoFalse
.Fill.Solid
.Fill.ForeColor.SchemeColor = 26
.Fill.Transparency = 0.9
.Shadow.Transparency = 0.4
.Line.Visible = msoFalse
.Top = 200
.Left = 100
.ZOrder msoSendToBack
End With
However I am unable to remove it, I thought this would do it:
Code:
Activesheets.Shapes("Draft").Select
Selection.Cut
I keep getting a runtime error 424, object required error. I guess I am missing something obvious, any suggestions?
Thanks