"No more new fonts may be applied to this workbook". Say what?

T

Toby Erkson

This error is stopping my code dead in its tracks :-(

I'm programmatically creating charts when this error occurs. If I select the graph plot, right click "Format Data Series...", the error will pop up. Click OK
and then the standard "Format Data Series" window displays like normal. Is there a way to, uh, clear out the register or whatever that keeps tabs on this
setting?

Here's where the code is breaking:
....
chartAvgCalls.Axes(xlCategory).Select
Selection.TickLabels.AutoScaleFont = True
With Selection.TickLabels.Font
.Name = "Arial"
.FontStyle = "Bold" '<-- this is where the error occurs
.Size = 10
End With
....

Ideas?
Toby Erkson
Oregon, USA
 
D

Dave Peterson

Cher, Madonna, Peltier.

(or did someone snip too much out of her response? hehehe)

(Jon, Jon, Jon, Jon, Jon -- in case you need extra for you next post.)

oh, oh.
 
D

Debra Dalgleish

Thanks for your continued support.
(I swear that the "Jon" was there when I hit the Send key.)

Dave said:
Cher, Madonna, Peltier.

(or did someone snip too much out of her response? hehehe)

(Jon, Jon, Jon, Jon, Jon -- in case you need extra for you next post.)

oh, oh.
 
D

Dave Peterson

r,r,r,r,r,r

(...for youR next post...)

Thanks for not taking me to task!)



Debra said:
Thanks for your continued support.
(I swear that the "Jon" was there when I hit the Send key.)
 
T

Toby Erkson

Modifying the Microsoft code, here's how to delete ALL charts in a workbook:

Sub Delete_All_Charts()
Dim ws As Worksheet, co As ChartObject
For Each ws In ActiveWorkbook.Worksheets
For Each co In ws.ChartObjects
co.Activate
ActiveWindow.Visible = False
Selection.Delete
Next co
Next ws
End Sub
 
D

Debra Dalgleish

Hey! There's a limit of one wise guy per thread. <g>

You're welcome, and thanks for posting your solution.
 
Top