select all cells to be printed on first page [based on

aLUPIN

New Member
Joined
Mar 8, 2017
Messages
6
Hello
Searching the net for days now and not coming near any solution...

I want vba code that returns or selects all cells that are within the printable range of page 1 were the print command being.
So based on the margin settings, and the default printer...
!!! [no page breaks are set - no print areas are defined] !!!

In other words the range [on the first page] that is marked by dotted lines
whenever a print preview as made. = gray dotted lines
See here. In this case I would want the Range(A1:AD47) returned

20192211 111705 - mrexcelquestion.jpg


I just have no clue...
Anyone?

Thx for your feedback/efforts
aL
 

Attachments

  • 20192211 111705 - mrexcelquestion.jpg
    20192211 111705 - mrexcelquestion.jpg
    44.8 KB · Views: 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Are you asking to set the print range from A1 to the last row and last column?
No,
I want to know what print range is Excel returns when I push on the print button.
Excel visualizes this by a defined area by grey dotted lines (see jpg).
[so excel gets this based on: margin settings, print area settings, page breaks, cell width, row heigth, etc.]
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,039
Members
448,940
Latest member
mdusw

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