VBA Chart Code

nigelk

Well-known Member
Joined
Aug 30, 2008
Messages
537
Hi all,

I've recorded some code:

Code:
   ActiveSheet.ChartObjects("Chart 7").Activate
   ActiveChart.Axes(xlValue).MinimumScale = 1

but when I change it to:

Code:
ActiveSheet.ChartObjects("Chart 7").Axes(xlValue).MinimumScale = 1

it fails. Can anyone tell me why?

Thanks,Nigel
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Most likely it fails because the ChartObjects object does not contain an 'Axes' property the way an ActiveChart object does.
 
Upvote 0
Andy,
Your new title still makes me laugh. :) Nice to know we achieve something in those Thursday sessions.
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top