Hi all. I have made a macro that does the exact same thing for 20 worksheets. I make 6 charts. Then I add a text box. I had the code working where it did everything I wanted without any problems.
I added an additional chart and now when I run the code the macro runs fine for 7 of the worksheets and then gives me an error:
"Run-time error 1004 - unable to set the name property of the font class"
This makes no sense to me since it has just successfully done it on 7 previous sheets 4 times each.
Are there limits to how many times I can run the following:
Very frustrated. Any thoughts would be great.
I added an additional chart and now when I run the code the macro runs fine for 7 of the worksheets and then gives me an error:
"Run-time error 1004 - unable to set the name property of the font class"
This makes no sense to me since it has just successfully done it on 7 previous sheets 4 times each.
Are there limits to how many times I can run the following:
Code:
With Chart_5.Chart.Shapes.AddLabel(msoTextOrientationHorizontal, 225, 9.75, 0, 0).TextFrame
.Characters.Text = "XXXXXXXXXX"
With .Characters(Start:=1, Length:=12).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 8
End With
End With
Very frustrated. Any thoughts would be great.