N
Nicole Seibert
I have this bit of code:
RETRY1:
Windows(NameWorksheet & ".xls").Activate
On Error GoTo ERRORTRAP1:
Sheets("Estimated - BA Approved").Select
Columns("A:A").Select
Dim T1
T1 = Cells(Rows.Count, 1).End(xlUp).Row
Range("A2:R" & T1).Sort Key1:=Range("A3"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Sheets("NOT Estimated - BA NOT Approved").Select
Columns("A:A").Select
Dim T2
T2 = Cells(Rows.Count, 1).End(xlUp).Row
Range("A2:R" & T2).Sort Key1:=Range("A3"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
RETRY2:
Windows(OldWorksheet & ".xls").Activate
On Error GoTo ErrHandler:
And then later on I have this bit of code:
Exit Sub
Else
End If
Next j
Next i
STOP2:
MsgBox ("This program has run and found no matching project numbers. You
may now combine Demand data.")
End Sub
ERRORTRAP1:
NameWorksheet = InputBox("You have entered an incorrect name of the new
Demand worksheet. Please try again.")
Resume RETRY1
ERRHANDLER:
OldWorksheet = InputBox("You have entered an incorrect old Demand worksheet
name. Please try again.")
Resume RETRY2:
Can Excel not handle two error handling statements? Does the "seek until
you find: ERRHANDLER" not work if you have already searched for a different
goto line? What's the deal?
Thanks,
Nicole
RETRY1:
Windows(NameWorksheet & ".xls").Activate
On Error GoTo ERRORTRAP1:
Sheets("Estimated - BA Approved").Select
Columns("A:A").Select
Dim T1
T1 = Cells(Rows.Count, 1).End(xlUp).Row
Range("A2:R" & T1).Sort Key1:=Range("A3"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Sheets("NOT Estimated - BA NOT Approved").Select
Columns("A:A").Select
Dim T2
T2 = Cells(Rows.Count, 1).End(xlUp).Row
Range("A2:R" & T2).Sort Key1:=Range("A3"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
RETRY2:
Windows(OldWorksheet & ".xls").Activate
On Error GoTo ErrHandler:
And then later on I have this bit of code:
Exit Sub
Else
End If
Next j
Next i
STOP2:
MsgBox ("This program has run and found no matching project numbers. You
may now combine Demand data.")
End Sub
ERRORTRAP1:
NameWorksheet = InputBox("You have entered an incorrect name of the new
Demand worksheet. Please try again.")
Resume RETRY1
ERRHANDLER:
OldWorksheet = InputBox("You have entered an incorrect old Demand worksheet
name. Please try again.")
Resume RETRY2:
Can Excel not handle two error handling statements? Does the "seek until
you find: ERRHANDLER" not work if you have already searched for a different
goto line? What's the deal?
Thanks,
Nicole