Print just the current page

Ajw43022

New Member
Joined
Aug 16, 2009
Messages
28
Is there VBA code to print out just the current page -- the page where I currently have the cursor? Note: I don't want to modify the whole print area, or anything like that. Thanks!
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I think that'll print out the entire sheet. I just want the current page of the sheet I'm on. Unless I'm mistaken. Sorry I wasn't clear before. thanks.
 
Upvote 0
If you mean what is visible

Code:
Sub atest()
ActiveWindow.VisibleRange.PrintOut
End Sub
 
Upvote 0
Printing just what is visible would be more helpful, but I'll try to clarify specifically what I would like. I'm working on a sheet that has many many pages in its print area (set w page breaks). I am working through the sheet, one page at a time. Once I've checked a page, I want to print it out. But this process is just a *little* bit time-wasting, because each time I have to bring up the print dialog and then manually enter in the current page I'm on to print. I'd like instead to program a macro that automatically prints just the page that I'm on -- that the cursor is currently on. Is that possible? thanks.
 
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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