My code should first find Cell1 & store the address to a variable, then find cell2 & store the address to another variable, then set the print area to the range between these 2 variables. A little help would be much appreciated.
Thank you.
Kenn
Code:
Sub SetPrintArea()
Dim Cell1 As Range
Dim Cell2 As Range
ActiveSheet.PageSetup.PrintArea = ""
Range("A3").Select
Selection.End(xlToRight).Select
Selection.End(xlUp).Select
Set Cell1 = ActiveCell
Range("A9").Select
Selection.End(xlDown).Select
Set Cell2 = ActiveCell
ActiveSheet.PageSetup.PrintArea = Range(Cell1 & ":" & Cell2) ' Getting error - [B]Method 'Range' of object'_Global' failed[/B]
End Sub
Thank you.
Kenn