Brettjg;256205 Wrote:
I've been trying to work around this but don't seem to be getting
anywhere. I
would much prefer not to have to select the shape array in order to
make the
font bold, but the only way seems to be to do them individually with
..textframe (and because there might be 15 shapes in the
array........forget
it)
This works for BOTH shapes:
ActiveSheet.Shapes.Range(Array("Text Box 26900", "Text Box
26901")).Select
With Selection
.Font.FontStyle = "Bold"
.ShapeRange.Fill.Visible = msoTrue
.ShapeRange.Fill.ForeColor.SchemeColor = 52
End With
and this works for ONLY ONE shape (because of .textframe)
With ActiveSheet.Shapes("Text Box 26900")
.TextFrame.Characters.Font.Bold = True
.Fill.Visible = msoTrue
.Fill.ForeColor.SchemeColor = 52
End With
Does anyone have a solution, or am I stuffed? Regards, Brett.
Hello brettjg,
You can loop through the array and change the shape's property without
selecting it.
EXAMPLE:
--------------------------------------------------------
Dim Shp As Variant
For Each Shp In Array("Text Box 26900", "Text Box 26903")
With ActiveSheet.Shapes(Shp)
TextFrame.Characters.Font.Bold = True
Fill.Visible = msoTrue
Fill.ForeColor.SchemeColor = 52
End With
Next Shp
--------------------------------------------------------
--
Leith Ross
Sincerely,
Leith Ross
'The Code Cage' (
http://www.thecodecage.com/)
------------------------------------------------------------------------
Leith Ross's Profile:
http://www.thecodecage.com/forumz/member.php?userid=75
View this thread:
http://www.thecodecage.com/forumz/sh...ad.php?t=71512