ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Program text in wordart (https://www.excelbanter.com/excel-programming/420998-program-text-wordart.html)

Mike K

Program text in wordart
 
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

Gary''s Student

Program text in wordart
 
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
--
Gary''s Student - gsnu200818

Mike K

Program text in wordart
 
Gary's Student,
Absolutely nothing is happening. What am I
doing wrong?

Mike

"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu200818


Gary''s Student

Program text in wordart
 
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.


--
Gary''s Student - gsnu200818


"Mike K" wrote:

Gary's Student,
Absolutely nothing is happening. What am I
doing wrong?

Mike

"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu200818


Mike K

Program text in wordart
 


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.

"Gary''s Student" wrote:

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.


--
Gary''s Student - gsnu200818


"Mike K" wrote:

Gary's Student,
Absolutely nothing is happening. What am I
doing wrong?

Mike

"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu200818


Mike K

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

Thanks a bunch,
Mike

"Gary''s Student" wrote:

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.


--
Gary''s Student - gsnu200818


"Mike K" wrote:

Gary's Student,
Absolutely nothing is happening. What am I
doing wrong?

Mike

"Gary''s Student" wrote:

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
--
Gary''s Student - gsnu200818



All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com