Hi all
Why my code stop on the second error "Subscript out of range"?
FB = Ws.VPageBreaks(1).Location.Column
If first sheet give me error here, code jump to the errorhandler(nextsh). But if this part of code give error second time i got orror on the screen and code stop.
Why my code stop on the second error "Subscript out of range"?
Code:
Dim LC As Integer, FB As Integer
Dim Ws As Worksheet
Application.ScreenUpdating = False
For Each Ws In ActiveWorkbook.Worksheets
On Error GoTo nextsh
LC = Ws.Range([A1], Ws.UsedRange).Columns.Count
ActiveWindow.View = xlPageBreakPreview
FB = Ws.VPageBreaks(1).Location.Column
'here i have other commands
nextsh:
Next Ws
If first sheet give me error here, code jump to the errorhandler(nextsh). But if this part of code give error second time i got orror on the screen and code stop.