If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Conditional font in chart axis
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 |
#2
|
|||
|
|||
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/ _______ Urban wrote: 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 |
#3
|
|||
|
|||
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/ _______ Urban wrote: 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 . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Org Chart font size 8 = Word font size 11? | Mike Maxwell | General Discussions | 0 | May 5th, 2004 04:29 PM |
Clustered Column Chart with Second Axis | Jon Peltier | Charts and Charting | 0 | April 10th, 2004 04:56 AM |
P & V chart: Secondary X axis gradient (again) | wlotto | Charts and Charting | 9 | March 15th, 2004 05:26 PM |
data to chart on primary axis | jw | Charts and Charting | 6 | September 24th, 2003 12:46 AM |
Multiple Conditional Formats for A Chart (Please Help)? | Jon Peltier | Charts and Charting | 0 | September 19th, 2003 09:40 PM |