Program text in wordart

M

Mike K

Oh Wise Ones,
This ones either really simple or can't be done.
If I have a sheet that constantly recalculates, can I have wordart display
the text of cell and change dynamically?

Thanks,
Mike
 
G

Gary''s Student

If B1 contains a formula, then this event macro will display the contents in
WordArt:

Private Sub Worksheet_Calculate()
If ActiveSheet.Shapes.Count > 0 Then
ActiveSheet.Shapes(1).Delete
End If

v = Range("B1").Value
ActiveSheet.Shapes.AddTextEffect(msoTextEffect1, v, "Arial Black", _
36#, msoFalse, msoFalse, 294.75, 184.5).Select
Application.CommandBars("WordArt").Visible = False
End Sub

Put the macro in the worksheet code area
 
G

Gary''s Student

Let's start with a clean sheet.

1. In A1 enter:
happiness


2. in B1 enter:
=A1


3. make sure the macro is installed in the worksheet code area, NOT a
standard module. Because it is worksheet code, it is very easy to install
and use:

a. right-click the tab name near the bottom of the window
b. select View Code - this brings up a VBE window
c. paste the stuff in and close the VBE window



4. change A1 to:
sadness

WordArt should appear.
 
M

Mike K

If I weren't such a moron I wouldn't have wasted more of your time. I guess
This Workbook does not equal worksheet code.
 
M

Mike K

Didn't mean to hit reply yet. Brilliant!! Works as advertised! My bad. You
good.

Thanks a bunch,
Mike
 

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