Change Shape text / Color

B

Bryce

Am trying to find out how to change the text of a shape with Excel 2007. So
far have:

ActiveSheet.Shapes(Application.Caller).OLEFormat.Object.Text = "CIP"

which works, but was expecting just shapes().text or .caption, neither of
which work. Is there a shorter form way of changing the text?

Also, with a linear gradient for the colour(color) of the shape, can set the
fore and back colours, but not sure how to set the Main colour:

ActiveSheet.Shapes(Application.Caller).Fill.BackColor.RGB = RGB(255,
153, 0)
ActiveSheet.Shapes(Application.Caller).Fill.ForeColor.RGB = RGB(255, 0, 0)

Probably getting confused with gradient stops etc.
Is there a way to call the preset styles under the "Format" drop-down for
shape styles, such as "Intense Effect - Accent 3"

Did figure out how to make it "Glow" though:
With Sheets("Input").Shapes("Oval 35")
.Glow.Radius = 20 'set radius = 0 to turn off (default), max radius is 20
.Glow.Color.RGB = RGB(255, 153, 0)
End With
 
G

Gary''s Student

Sub fixtext()
ActiveSheet.Shapes(Application.Caller).Select
Selection.Characters.Text = "Hello World"
End Sub
 
H

Herbert Seidenberg

Excel 2007
Sub NoSelect()
With ActiveSheet.Shapes(1).TextEffect
..Text = "Hello World"
..FontBold = True
..FontName = "Ariel"
End With
End Sub
 
B

Bryce

Thanks heaps to both of you, works well

Any thoughts on preset styles or gradient colours?
 

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