Print every tab which is a chart (or everything but 'data')

Grizlore

Active Member
Joined
Aug 22, 2006
Messages
259
Dear All,

Would someone have such a code?

I am try to print just the charts in a workbooks using VBA

I have a spreadsheet with >28 charts in it, and one data worksheet (called "data).

So either need to print everything apart from the tab called "Data". Or print every tab which is a chart.

Would someone have such a code. I am getting stuck with my code attempts.


Help would be much appreciated
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
This maybe:

Code:
Sub Test()
Dim x As Worksheet
    For Each x In ActiveWorkbook.Worksheets
    
        If x.Name <> "Data" Then x.PrintOut
    
    Next x
End Sub
 
Upvote 0
ummm... not sure why, but your code just prints the "data" tab. Whether i put <> or = "data"

very strange
 
Upvote 0
Thanks seems to have fixed it.

Many Thanks


ps - there is and annoying strobing print announcement when flashes on/off, and Application.ScreenUpdating = False doesnt stop it.


pps - Oh yer... welcome to the board.
 
Upvote 0

Forum statistics

Threads
1,214,986
Messages
6,122,611
Members
449,090
Latest member
vivek chauhan

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