Set print area in Excel

Microsoft Excel 2003 (full)
November 17, 2009 at 07:07:31
Specs: Windows XP
How can I create a macro that will select from the Active Cell (wherever it is) to A1, Set Print Area, then Print. TIA.

See More: Set print area in Excel

Report •

November 17, 2009 at 08:47:32

Try this:

Option Explicit
Private Sub SetPrintArea()
Dim strACAddr As String

On Error GoTo ErrHnd

'get active cell address
strACAddr = ActiveCell.Address
'set print area
ActiveSheet.PageSetup.PrintArea = "$A$1:" & strACAddr
Exit Sub

'error handler
End Sub

See the VB help for more information on print out settings, that can modify the printing


Report •

November 17, 2009 at 11:06:38
Thank you very much for your help. That's exactly what I'm looking for. Thanks again.

Report •

Related Solutions

Ask Question