Have Range -> Put in Print Area?? via VBA

want2b

Board Regular
Joined
Jan 27, 2004
Messages
89
Sub yWant2b()
Range("G3").Select
ActiveCell.End(xlDown).Select
Range(ActiveCell, ActiveCell.End(xlDown)).Select
End Sub

I've been happy all day cause I knew I could get this range into what I got from the micro recorder WRONG

How do I get Range(ActiveCell,ActiveCell.End(xlDown)).Select
To be the print Area???????

While I'm at it. I would like this to print on the left edge of the page,
It is only one column, The number or rows will varry but I would like it to print as large as possible or as small as necessary to get on one page.
I began to think I was getting a handle on this

Sorry But Thanks


ActiveSheet.PageSetup.PrintArea = ???????????????????
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0)
.RightMargin = Application.InchesToPoints(0.2)
.TopMargin = Application.InchesToPoints(0.116666666666667)
.BottomMargin = Application.InchesToPoints(0.553472222222222)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 720
.CenterHorizontally = False
.CenterVertically = True
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 84
.PrintErrors = xlPrintErrorsDisplayed
End With
 
Hi Want2b:

Good Job -- you have it working now the way you wanted it to work -- now let us keep EXCELing!
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,216,075
Messages
6,128,668
Members
449,463
Latest member
Jojomen56

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