I have written the following code to enable the printing of a selected area of a large worksheet
Sub PagePr(RName, NewYr)
Sheets("ManagementAccounts_" & NewYr).Select
    
   
    
    
   With ActiveSheet.PageSetup
  ' .PrintArea = Range(RName)
   .PrintArea = Range(RName).Address   xxxxxx
   
   .Orientation = xlLandscape
        
        .PaperSize = xlPaperA4
        
        .FitToPagesWide = 1
        .FitToPagesTall = 1
        
        
    End With
    
  
 
    ActiveWindow.SelectedSheets.Printout Copies:=1, Collate:=True, _
        IgnorePrintAreas:=False

End Sub
It does not work.
The computer seems to go into a loop at the line .PrintArea = Range(RName).Address
The only way I can get going again is by restarting.
Where have I gone wrong?
John