RobdogJenny
New Member
- Joined
- Jul 6, 2020
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
Hello,
This is my first query, so I hope I've provided enough information... anything I've forgotten, please let me know.
I have a sheet with many tabs, and I want to create a print macro (that previews the print, and doesn't just send it straight to the printer). All my tabs are named but I've called them Sheet1, Sheet2 etc. below for clarity.
Sheet1 (A1:G10)
Sheet2 (A1:G10)
Sheet3 (A1:H12)
Sheet5 (A1:I56)
and a print area that is called "Infrastructure_Print"
I've got as far as:
but I can't work out how to put the print area in at the end, and I'm getting 4 separate print previews, when I only want 1. I want to be able to click a button and have only those ranges show in Print Preview.
Is this possible?
Many thanks in advance,
Jen
This is my first query, so I hope I've provided enough information... anything I've forgotten, please let me know.
I have a sheet with many tabs, and I want to create a print macro (that previews the print, and doesn't just send it straight to the printer). All my tabs are named but I've called them Sheet1, Sheet2 etc. below for clarity.
Sheet1 (A1:G10)
Sheet2 (A1:G10)
Sheet3 (A1:H12)
Sheet5 (A1:I56)
and a print area that is called "Infrastructure_Print"
I've got as far as:
VBA Code:
Sub PrintSomeCells()
Sheets("Sheet1").Select
Range("A1:G10").PrintPreview
Sheets("Sheet2").Select
Range("A1:G10").PrintPreview
Sheets("Sheet3").Select
Range("A1:H12").PrintPreview
Sheets("Sheet5").Select
Range("A1:I56").PrintPreview
End Sub
but I can't work out how to put the print area in at the end, and I'm getting 4 separate print previews, when I only want 1. I want to be able to click a button and have only those ranges show in Print Preview.
Is this possible?
Many thanks in advance,
Jen