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
|
|||
|
|||
Referencing chart sheets in vba
I asked this question in the programming forum but got no replies, so I'll
try it here. I'm trying to adapt some code (from Jon Peltier's website) to scale chart axes based on cell contents. I can get the code to work for charts embedded in the active worksheet and other worksheets, but I can't figure out how to reference a chart that is on it's own sheet. How is this done? Here is the type of code I'm working with: ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory) _ .MaximumScale = Target.Value Can anyone help me? |
#2
|
|||
|
|||
Referencing chart sheets in vba
Never mind. i figured it out. You have to use the CHARTS property.
"The Big Smelly Ogre" wrote: I asked this question in the programming forum but got no replies, so I'll try it here. I'm trying to adapt some code (from Jon Peltier's website) to scale chart axes based on cell contents. I can get the code to work for charts embedded in the active worksheet and other worksheets, but I can't figure out how to reference a chart that is on it's own sheet. How is this done? Here is the type of code I'm working with: ActiveSheet.ChartObjects("Chart 1").Chart.Axes(xlCategory) _ .MaximumScale = Target.Value Can anyone help me? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fan charts | Dean | Charts and Charting | 7 | May 30th, 2005 11:51 AM |
Urgent Chart Questions | Brent E | General Discussion | 0 | May 9th, 2005 11:01 PM |
Chart sheets cause data sheets to be blank | Jacinthe | Charts and Charting | 2 | April 29th, 2005 02:18 PM |
Selecting Charts in a Macro | Herman Merman | Charts and Charting | 1 | August 18th, 2004 12:25 AM |
Creating chart with two vaiables, Trendline and its referencing / linking to a cell | sudhanshu | Charts and Charting | 0 | January 28th, 2004 02:45 PM |