View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.charting
GeoBrooks GeoBrooks is offline
external usenet poster
 
Posts: 24
Default Delete chart's custom number format?

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

"GeoBrooks" wrote:

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

"Andy Pope" wrote:

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

GeoBrooks wrote:
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


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info