Printing Multiple Filtered Views

ryan7

Board Regular
Joined
Apr 30, 2020
Messages
83
Office Version
  1. 2016
Platform
  1. Windows
I have a spreadsheet which I am required to filter, then print. There are 40 different print views.
Am I able to do this with a couple of clicks or do you need to go into each one individually and print (It's so time consuming).

Thanks
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Here is simple code to print all views
VBA Code:
Sub PrintViews()
    Dim cView As CustomView
    For Each cView In ActiveWorkbook.CustomViews
        cView.Show
        ActiveSheet.PrintOut
    Next
End Sub
 
Upvote 0
I should have said that you need to run above code from the sheet containing the data
The code assumes that all custom views in the workbook refer to the same sheet
 
Upvote 0
I can'
Here is simple code to print all views
VBA Code:
Sub PrintViews()
    Dim cView As CustomView
    For Each cView In ActiveWorkbook.CustomViews
        cView.Show
        ActiveSheet.PrintOut
    Next
End Sub
Can't seem to get this to work.
 
Upvote 0
does message box return expected list?
VBA Code:
Sub ListViews()
    Dim cView As CustomView, msg$
    For Each cView In ActiveWorkbook.CustomViews
        msg = msg & vbCr & cView.Name
    Next
    MsgBox msg
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,186
Members
448,554
Latest member
Gleisner2

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