Help needed on a printing macro

BELFRED6

Board Regular
Joined
Oct 31, 2008
Messages
110
I have a sheet called "Orders". I am using a macro to print out results of a various lists returned by an auto filter located in column B. Actually, the macro selects the first choice, "Driver 1", and prints the resulted list. Then the macro selects the second criteria "Driver 2" and prints out the new resulted list. And then I need the macro to select the "Custom choice" proposed by the auto filter menu. The custom criteria should be Column H >0.
How to formulate that condition in my exisiting macro below?

Sheets("Orders").Select
Selection.AutoFilter Field:=2, Criteria1:="Driver 1"
ActiveWindow.SelectedSheets.printout From:=1, To:=1, Copies:=1, Collate _
:=True
Selection.AutoFilter Field:=2, Criteria1:="Driver 2"
ActiveWindow.SelectedSheets.printout From:=1, To:=1, Copies:=1, Collate _
:=True
Selection.AutoFilter Field:=2, Criteria1:=???????????
ActiveWindow.SelectedSheets.printout From:=1, To:=1, Copies:=1, Collate _
:=True
End Sub
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Have you tried Recoding a Macro while supplying your criteria? You will find that it will give you the answer you want...
 
Upvote 0
Thank you, Jim. I haven't tried but you're definitely right, it will give me what I need. Shame on me for not having thought about it on my own...
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,952
Members
448,535
Latest member
alrossman

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