Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ER ER is offline
external usenet poster
 
Posts: 3
Default Macro trouble: inserting 'watermark'

I have recorded amacro that inserts a 'watermark' text in
a workbook. However, when I try to run it, it breaks on
the line when the specific Word art shape is being
selected. I doesn't matter which shape I choose, it always
breaks on this line. When I set a watch on this
expression, it shows 'The item with the specified name
wasn't found'. The code is below. can anybody help with
this? Also, where would I save this macro so it's available
on any worksheet I work on in Excel?

Thanks


Sub Watermark()

ActiveSheet.Shapes.AddTextEffect
(msoTextEffect1, "Draft", "Arial Black", 36# _
, msoFalse, msoFalse, 318.75, 159.75).Select
Range("I11:I13").Select
Range("I13").Activate
ActiveSheet.Shapes("WordArt 13").Select
Selection.ShapeRange.IncrementRotation -43.46
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Transparency = 0.5
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
Selection.ShapeRange.Line.ForeColor.SchemeColor = 55
Selection.ShapeRange.Line.BackColor.RGB = RGB(255,
255, 255)
Selection.ShapeRange.ZOrder msoBringToFront
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Macro trouble: inserting 'watermark'

Try the following:


Dim SH As Excel.Shape
Set SH = ActiveSheet.Shapes.AddTextEffect(msoTextEffect1, _
"Draft", "Arial Black", 36#, _
msoFalse, msoFalse, 318.75, 159.75)
With SH
.IncrementRotation -43.46
.Fill.Visible = msoFalse
.Fill.Transparency = 0.5
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = 55
.Line.BackColor.RGB = RGB(255, 255, 255)
.ZOrder msoBringToFront
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"ER" wrote in message
...
I have recorded amacro that inserts a 'watermark' text in
a workbook. However, when I try to run it, it breaks on
the line when the specific Word art shape is being
selected. I doesn't matter which shape I choose, it always
breaks on this line. When I set a watch on this
expression, it shows 'The item with the specified name
wasn't found'. The code is below. can anybody help with
this? Also, where would I save this macro so it's available
on any worksheet I work on in Excel?

Thanks


Sub Watermark()

ActiveSheet.Shapes.AddTextEffect
(msoTextEffect1, "Draft", "Arial Black", 36# _
, msoFalse, msoFalse, 318.75, 159.75).Select
Range("I11:I13").Select
Range("I13").Activate
ActiveSheet.Shapes("WordArt 13").Select
Selection.ShapeRange.IncrementRotation -43.46
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Transparency = 0.5
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
Selection.ShapeRange.Line.ForeColor.SchemeColor = 55
Selection.ShapeRange.Line.BackColor.RGB = RGB(255,
255, 255)
Selection.ShapeRange.ZOrder msoBringToFront
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
ER ER is offline
external usenet poster
 
Posts: 3
Default Macro trouble: inserting 'watermark'

Thanks Chip, that's great.
-----Original Message-----
Try the following:


Dim SH As Excel.Shape
Set SH = ActiveSheet.Shapes.AddTextEffect

(msoTextEffect1, _
"Draft", "Arial Black", 36#, _
msoFalse, msoFalse, 318.75, 159.75)
With SH
.IncrementRotation -43.46
.Fill.Visible = msoFalse
.Fill.Transparency = 0.5
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = 55
.Line.BackColor.RGB = RGB(255, 255, 255)
.ZOrder msoBringToFront
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"ER" wrote in

message
...
I have recorded amacro that inserts a 'watermark' text

in
a workbook. However, when I try to run it, it breaks on
the line when the specific Word art shape is being
selected. I doesn't matter which shape I choose, it

always
breaks on this line. When I set a watch on this
expression, it shows 'The item with the specified name
wasn't found'. The code is below. can anybody help with
this? Also, where would I save this macro so it's

available
on any worksheet I work on in Excel?

Thanks


Sub Watermark()

ActiveSheet.Shapes.AddTextEffect
(msoTextEffect1, "Draft", "Arial Black", 36# _
, msoFalse, msoFalse, 318.75, 159.75).Select
Range("I11:I13").Select
Range("I13").Activate
ActiveSheet.Shapes("WordArt 13").Select
Selection.ShapeRange.IncrementRotation -43.46
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Transparency = 0.5
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
Selection.ShapeRange.Line.ForeColor.SchemeColor = 55
Selection.ShapeRange.Line.BackColor.RGB = RGB(255,
255, 255)
Selection.ShapeRange.ZOrder msoBringToFront
End Sub



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Macro trouble: inserting 'watermark'

ER

Try this:

Sub Watermark()
Set myDocument = ActiveSheet
Set myWatermark = myDocument.Shapes.AddTextEffect( _
PresetTextEffect:=msoTextEffect1, _
Text:="Draft", _
FontName:="Arial Black", _
FontSize:=36, _
FontBold:=False, _
FontItalic:=False, _
Left:=318.75, _
Top:=159.75)
With myWatermark
.IncrementRotation -43.46
.Fill.Visible = msoFalse
.Fill.Transparency = 0.5
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = 55
.Line.BackColor.RGB = RGB(255, 255, 255)
.ZOrder msoBringToFront
End With
End Sub

Regards

Trevor


"ER" wrote in message
...
I have recorded amacro that inserts a 'watermark' text in
a workbook. However, when I try to run it, it breaks on
the line when the specific Word art shape is being
selected. I doesn't matter which shape I choose, it always
breaks on this line. When I set a watch on this
expression, it shows 'The item with the specified name
wasn't found'. The code is below. can anybody help with
this? Also, where would I save this macro so it's available
on any worksheet I work on in Excel?

Thanks


Sub Watermark()

ActiveSheet.Shapes.AddTextEffect
(msoTextEffect1, "Draft", "Arial Black", 36# _
, msoFalse, msoFalse, 318.75, 159.75).Select
Range("I11:I13").Select
Range("I13").Activate
ActiveSheet.Shapes("WordArt 13").Select
Selection.ShapeRange.IncrementRotation -43.46
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Transparency = 0.5
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
Selection.ShapeRange.Line.ForeColor.SchemeColor = 55
Selection.ShapeRange.Line.BackColor.RGB = RGB(255,
255, 255)
Selection.ShapeRange.ZOrder msoBringToFront
End Sub



  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Macro trouble: inserting 'watermark'

How can distribute this macro(VBA code) to others so that
they can use it as well, and always be available for them
in their Excel application?

-----Original Message-----
Try the following:


Dim SH As Excel.Shape
Set SH = ActiveSheet.Shapes.AddTextEffect

(msoTextEffect1, _
"Draft", "Arial Black", 36#, _
msoFalse, msoFalse, 318.75, 159.75)
With SH
.IncrementRotation -43.46
.Fill.Visible = msoFalse
.Fill.Transparency = 0.5
.Line.Weight = 0.75
.Line.DashStyle = msoLineSolid
.Line.Style = msoLineSingle
.Line.Transparency = 0#
.Line.Visible = msoTrue
.Line.ForeColor.SchemeColor = 55
.Line.BackColor.RGB = RGB(255, 255, 255)
.ZOrder msoBringToFront
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"ER" wrote in

message
...
I have recorded amacro that inserts a 'watermark' text

in
a workbook. However, when I try to run it, it breaks on
the line when the specific Word art shape is being
selected. I doesn't matter which shape I choose, it

always
breaks on this line. When I set a watch on this
expression, it shows 'The item with the specified name
wasn't found'. The code is below. can anybody help with
this? Also, where would I save this macro so it's

available
on any worksheet I work on in Excel?

Thanks


Sub Watermark()

ActiveSheet.Shapes.AddTextEffect
(msoTextEffect1, "Draft", "Arial Black", 36# _
, msoFalse, msoFalse, 318.75, 159.75).Select
Range("I11:I13").Select
Range("I13").Activate
ActiveSheet.Shapes("WordArt 13").Select
Selection.ShapeRange.IncrementRotation -43.46
Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Transparency = 0.5
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
Selection.ShapeRange.Line.ForeColor.SchemeColor = 55
Selection.ShapeRange.Line.BackColor.RGB = RGB(255,
255, 255)
Selection.ShapeRange.ZOrder msoBringToFront
End Sub



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Having Trouble Inserting a Column Elisa Excel Worksheet Functions 1 January 23rd 08 04:37 PM
macro trouble jen_writer Excel Discussion (Misc queries) 1 February 14th 07 11:47 PM
Trouble returning to Normal view after inserting a header and foot Eazy-E Excel Worksheet Functions 0 July 26th 06 11:58 PM
MACRO TROUBLE HELP Excel Discussion (Misc queries) 2 June 7th 06 04:09 PM
Macro trouble kdp Excel Programming 1 February 25th 04 10:25 PM


All times are GMT +1. The time now is 09:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"