Print two different worksheets.........ahgggggggggggg

smm3

Board Regular
Joined
Oct 30, 2004
Messages
67
I've been trying to work out how to create a marco that will print out two different worksheets in one workbook. I need to print out the only worksheet page on tab "2nd request" and page 2 of a worksheet from tab"Checklist. I tried a macro but that didn't work. I tried to use ranges, but "2nd request "didn't print and "Checklist" printed the entire 4 pages. I found I can't set the print area for 4 pages and have it only print page 2 later. Since I'll be using both the 4 page print out and the 2 page printout from different worksheets many times during a day, I'll be changing the print area back and forth till my hair falls out.

If anybody has any ideas, it would be greatly appreciated.

Vickie
':eek:'
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I have not a working printer, so I can't test the statement for printing to file (italic and bold code).
However, If you have problems with "print area" and printing a page to a file, you can store print area, clear it, print to file and restore old print area.
Try the code below:

Dim StrPrintArea as String
'Store Old Print Area
StrPrintArea = Sheets("2nd request").PageSetup.PrintArea
'Clear Print Area
Sheets("2nd request").PageSetup.PrintArea = ""

Sheets("2nd request").PrintOut From:=1, To:=1, PrintToFile:=True, PrToFileName:="FileName" 'Print to file NOT TESTED
'Restore Old Print Area
Sheets("2nd request")..PageSetup.PrintArea = StrPrintArea

'Repeat above procedure for Sheet "Checklist"

...


Ciao
 
Upvote 0
I didn't work, but I'm unsure if it really didn't work or if I didn't put it in correctly.
I copied the code and inserted "checklist" in place of "2nd request" and put them both in view code area.

Vickie
 
Upvote 0
Why not just record a macro, print the first page than go to 2nd request!worksheet, highlight page 2 and print and stop recording.
Edit the marcro to include Application.ScreenUpdating=False at the start of the macro and Application.ScreenUpdating=Trud and the end. :p
 
Upvote 0
Hi, Vickie -

Give this a try:

Sub Printsheets()
'Change the below Sheet4 to correspond to your sheet number for your tab'
Sheet4.Select
Sheet4.PrintOut

'Change the below Sheet2 to correspond to your sheet number for your tab'
Sheet2.Select
Sheet2.PrintOut

'Change the below [a1] to the cell in which you want to return to once printing is completed'
[a1].Select
End Sub

HTH,
Frank
 
Upvote 0
I've spent the last few days trying all of the above. I can't get the macro to work...it didn't print either page. I tried all the code suggestions, but it prints all the pages on the sheet.
I thought and tried to copy the second page and put it on the first page I want to print. I just can't get it to link correctly. Part of the link works but not all.

ahggggggg
If anyone has suggestions or ideas, I'm completely open.
Thanks,
Vickie

:confused:
 
Upvote 0

Forum statistics

Threads
1,222,039
Messages
6,163,552
Members
451,843
Latest member
vitto

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