I keep on getting this error when I try to run some VBA code that a former employee wrote, I can't seem to find what the issue is but this is where it stops running.
It stops at ActiveCell.PageBreak = xlPageBreakManual, can someone please point me in the right direction to try and figuring this issue out?
Thank you!
It stops at ActiveCell.PageBreak = xlPageBreakManual, can someone please point me in the right direction to try and figuring this issue out?
Code:
Columns("T:Z").EntireColumn.Hidden = True
Sheets("tm").Select
'add pagebreak
Dim myStop As Long
myStop = Range("R1").CurrentRegion.Rows.count
For myRow = 1 To myStop
If Cells(myRow, 1) = "" Then
Cells(myRow + 1, 1).Select
ActiveCell.PageBreak = xlPageBreakManual
End If
Next myRow
Thank you!