using excel 2007 vba to control textbox properties on chart

I'm trying to control formatting of textboxes on my chart via vba.  I've been able to change the formula but other properties (e.g., font, outline) error out.  Is there a list somewhere?  (No, that would be too easy.)
gofasteddieAsked:
Who is Participating?
 
andrewssd3Connect With a Mentor Commented:
I have Excel 2013, which is a little better at recording actions on charts with the macro recorder. With some tidying, this is what I got from the recorder:
    Dim tb As Shape


    Set tb = ActiveChart.Shapes("TextBox 1")
    
    With tb
        With .Line
            .Visible = msoTrue
            .ForeColor.ObjectThemeColor = msoThemeColorAccent1
            .ForeColor.TintAndShade = 0
            .ForeColor.Brightness = 0
        End With
        
        With .Fill
            .Visible = msoTrue
            .ForeColor.ObjectThemeColor = msoThemeColorAccent1
            .ForeColor.TintAndShade = 0
            .ForeColor.Brightness = 0
            .Solid
        End With
        
        .TextFrame2.TextRange.Font.Size = 18
    End With

Open in new window

It may be the ObjectThemeColor etc aren't present in 2007 - I can't remember, but maybe this will give you a start.
0
 
FaustulusCommented:
There are different kinds of text boxes. I can work this out for you if you post your workbook withe the chart sheet and the textbox.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.