View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JMay JMay is offline
external usenet poster
 
Posts: 422
Default Can I toggle this Code - to Stamp and to UnStamp?

Below code is working just fine; I 've assigned it to a icon on my
Formatting Toolbar.
At present it is a one-directional Stamping of the Text "DRAFT....
I'de like to be able to click on my button "a second time" and have the text
"DRAFT..." disappear; then click again, and have it appear,
((Toggle-type)) - Can this be done?
If how, how would I modify (the code) it?
TIA,

Sub DraftStamp()
With ActiveSheet.Shapes.AddTextEffect( _
msoTextEffect1, "D R A F T" & Chr(10) & "ISSUED " & Date,
"Arial Black", _
24#, msoFalse, msoFalse, Left:=300, Top:=5)
With .Fill
.Visible = msoTrue
.Solid
.ForeColor.SchemeColor = 10
.Transparency = 0.2
End With
With .Line
.Weight = 0.75
.DashStyle = msoLineSolid
.Style = msoLineSingle
.Transparency = 0#
.Visible = msoTrue
.ForeColor.RGB = RGB(0, 0, 0)
.BackColor.RGB = RGB(255, 255, 255)
End With
.LockAspectRatio = msoTrue
.Height = 60#
.Width = 175#
.Rotation = 0#
End With
ActiveSheet.Protect _
DrawingObjects:=True, _
Contents:=False, _
Scenarios:=False
End Sub