Delete chart's custom number format?

G

GeoBrooks

In Excel 2007:

One can create a custom number format when modifying a chart's axis format.
Unlike a custom cell format, this chart number format does not have a hook
for deleting it. Is there a method for deleting a custom chart number format?

George
 
A

Andy Pope

Hi,

You need to delete the custom number format at the workbook level, as in
previous versions.

' specify custom format in the NumberFormat argument
ActiveWorkbook.DeleteNumberFormat NumberFormat:="0"

To fully remove the format from the list it looks like a restart of
Excel is required, which was not previously required.

Cheers
Andy
 
G

GeoBrooks

Andy,

Thanks for the encouraging words. Yet I'm not sure how to apply your advice.

I tried winging it by adding some vba code, replacing "0" with "#," (my
trial number format). Compiled, ran the function in the immediate window
without error. Saved. Reopened. Format was still there. Is this because
the command does not refer to the chart number formats? Or?

G
 
G

GeoBrooks

Ah, but it works in a macro-enabled workbook. But how does one remove it
from the normal template so that it is no longer available?

I ask only because I'm teaching Excel and don't want to confuse my students
(more than they already are!)

G
 
G

GeoBrooks

Oops. I must be as confused as my students! New charts do not have this
format available.

G
 

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