ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Looping Through Charts (https://www.excelbanter.com/excel-programming/298984-re-looping-through-charts.html)

No Name

Looping Through Charts
 
Chris, Thanks for your reply. It runs the code but still
does not cycle through the different chart sheets. Any
thoughts?
-----Original Message-----
it should actually be :
Dim wks As Chart '<< singular
For Each wks In ActiveWorkbook.Charts
........

----- JD wrote: -----

This is the code I tried and failed.


Sub Add()
'Dim ii As Integer


Dim wks As Charts
For Each wks In ActiveWorkbook.Charts
Call ChartsToLine
Next
End Sub
.


Tom Ogilvy

Looping Through Charts
 
Sub Add()
'Dim ii As Integer


Dim wks As Charts
For Each wks In ActiveWorkbook.Charts
wks.Activate
Call ChartsToLine
Next
End Sub
End Sub

will give you the visual appeal of cycling throught the charts and probably
cause your sub to work.

--
Regards,
Tom Ogilvy


wrote in message
...
Chris, Thanks for your reply. It runs the code but still
does not cycle through the different chart sheets. Any
thoughts?
-----Original Message-----
it should actually be :
Dim wks As Chart '<< singular
For Each wks In ActiveWorkbook.Charts
........

----- JD wrote: -----

This is the code I tried and failed.


Sub Add()
'Dim ii As Integer


Dim wks As Charts
For Each wks In ActiveWorkbook.Charts
Call ChartsToLine
Next
End Sub
.





All times are GMT +1. The time now is 04:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com