N
Noemi
Hi
I have on On Error Goto inside a loop and the first time it has an error it
goes to the section which performs are task but the second time it has an
error it crashs and I get the error 9 message.
Here is my code
Dim stName As String
Dim stThe As String
Dim stLetter As String
Dim dbLong As Double
Sheets("Temp").Select
Range("A2").Select
Do
stName = ActiveCell.Value
stLetter = Left(stName, 1)
If stLetter = "Y" Or stLetter = "Z" Then
stLetter = "X-Z"
End If
On Error GoTo BoldLine
Sheets(stLetter).Select
(more code)
BoldLine:
Sheets("Temp").Select
ActiveCell.Font.Bold = True
(more code)
ActiveCell.Offset(1, 0).Select
Loop Until ActiveCell.Value = ""
Thanks Noemi
I have on On Error Goto inside a loop and the first time it has an error it
goes to the section which performs are task but the second time it has an
error it crashs and I get the error 9 message.
Here is my code
Dim stName As String
Dim stThe As String
Dim stLetter As String
Dim dbLong As Double
Sheets("Temp").Select
Range("A2").Select
Do
stName = ActiveCell.Value
stLetter = Left(stName, 1)
If stLetter = "Y" Or stLetter = "Z" Then
stLetter = "X-Z"
End If
On Error GoTo BoldLine
Sheets(stLetter).Select
(more code)
BoldLine:
Sheets("Temp").Select
ActiveCell.Font.Bold = True
(more code)
ActiveCell.Offset(1, 0).Select
Loop Until ActiveCell.Value = ""
Thanks Noemi