I have harvested some code in order to create a watermark on all sheets within a workbook. The problem is - the watermarks are placed on only the first (active) sheet (one on top of another). How do i get the VBA to move over the next sheet, and the next, and so on. Staring at the code but its not coming to me. Anyone see my problem(s)?
Sub AddWatermark()
' Inserts a wordart "watermark" onto the current sheet with its
' upper left corner positioned on the upper left corner of the
' selected cell.
Dim StrIn As String
StrIn = InputBox("Enter watermark text")
If StrIn = "" Then Exit Sub
Dim ws As Worksheet
For Each ws In Worksheets
With ActiveSheet.Shapes.AddTextEffect(msoTextEffect3, StrIn, _
"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.3
.Shadow.Transparency = 0.4
.Line.Visible = msoFalse
'position at cell corner
'.Top = Selection.Top
.Top = 25
.Left = 25
'.Left = Selection.Left
End With
Next ws
End Sub
Sub AddWatermark()
' Inserts a wordart "watermark" onto the current sheet with its
' upper left corner positioned on the upper left corner of the
' selected cell.
Dim StrIn As String
StrIn = InputBox("Enter watermark text")
If StrIn = "" Then Exit Sub
Dim ws As Worksheet
For Each ws In Worksheets
With ActiveSheet.Shapes.AddTextEffect(msoTextEffect3, StrIn, _
"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.3
.Shadow.Transparency = 0.4
.Line.Visible = msoFalse
'position at cell corner
'.Top = Selection.Top
.Top = 25
.Left = 25
'.Left = Selection.Left
End With
Next ws
End Sub