Overrighting ( bring to front)

D

dpal

If I have cells A1 though F19 filled with data.
I am looking for a way to put in A20 a word ("shipped") that would cover
what is written in the block of cells.
Similiar to if I was to put in a word art over those cells.

Can't do it with word Art because I am using a "IF" statement linked to
another page so if one cell ="Y" A20 would say shipped.

Do I use a macro for word art.
Can you help?
Thanks
Dpal
 
D

Dave Peterson

I think I would add the wordart manually--instead of by code.

But then I could use a macro that would hide or show that shape/object.

If you want to try, add your wordard to the worksheet. Position it where it
should be when it's visible.

Make a note of the name of the shape--select the shape and look at the namebox
(to the left of the formula bar). You can actually give it a nice meaningful
name by selecting the shape, typing the new name in the namebox and hitting
enter.

I used "WordArt1" as the name for my shape.

Then rightclick on the worksheet tab that owns the cell with the formula and the
shape. Select View Code.

Paste this into the newly opened code window (usually on the righthand side).

Option Explicit
Private Sub Worksheet_Calculate()

Dim myShape As Shape

Set myShape = Me.Shapes("WordArt1")

If LCase(Me.Range("A20").Value) = LCase("shipped") Then
myShape.Visible = True
Else
myShape.Visible = False
End If

End Sub

Macros have to be enabled for this to work. You may have to save, close and
reopen (allowing macros to run) the workbook to see it work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top