Application-Defined Error 1004
In a macro that checks for a number of errors and sets the zoom, print range,
and page breaks for each worksheet, I'm getting this error on the Set rngLast
line:
For Each wrksht In ActiveWorkbook.Worksheets
With wrksht
.Activate
intLastRow = GetLastRow()
If intLastRow < 0 Then
' Reset zoom and view
With ActiveWindow
.View = xlNormalView
.Zoom = intZoom
End With
' Assign print range and set page breaks
Set rngLast = Cells(intLastRow, fintHeaderColumn())
.PageSetup.PrintArea = "$A$1:" & rngLast.Address
Call SetPageBreaks(intLastRow)
Does anyone know why?
Sprinks
|