Conditional font in chart axis

  • Thread starter Thread starter Urban
  • Start date Start date
U

Urban

How can I control the font in a chart (format axis, font
strikethrough) with Visual Basic code. . I would like to
switch the font on the values depending on the status of
my calculations. I have a complex risk analysis that takes
about 10 seconds to calculate on a 2 GHz machine. The
calculation is only activated by pressing a button but I
want to make sure that if the spreadsheet is not
recalculated the values has a strikethrough.

Thanks for the help,

Urban
 
Urban -

Make yourself a dummy chart, with the text elements you'd like to
reformat. Turn on the Macro Recorder, and make the changes to the font
formatting. Switch to the VB Editor, and look at the code that was
generated. There will be some extraneous lines, because your fine tuned
procedures don't waste steps selecting everything or setting defaults
back to the default values. But you will see the syntax for changing the
formatting of the font elements.

Now apply the appropriate code to the procedure that works on the real
chart.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
Thanks,

that worked fine.

Urban
-----Original Message-----
Urban -

Make yourself a dummy chart, with the text elements you'd like to
reformat. Turn on the Macro Recorder, and make the changes to the font
formatting. Switch to the VB Editor, and look at the code that was
generated. There will be some extraneous lines, because your fine tuned
procedures don't waste steps selecting everything or setting defaults
back to the default values. But you will see the syntax for changing the
formatting of the font elements.

Now apply the appropriate code to the procedure that works on the real
chart.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______


.
 
Back
Top