Conditional font in chart axis

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
 
J

Jon Peltier

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/
_______
 
U

Urban

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/
_______


.
 

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