Urgent - Run-Time Error "450"
Sub trimit()
Dim a As Long
Dim myRng As Range
For a = 7 To 100
x = Mid(Application.Trim(Cells(a, 1).Value), 12, 20)
If a Mod 2 = 0 Then
If Cells(a, 1).Value 0 Then
Cells(a, 2).Value = x
Else
Cells(a, 2).Value = 0
End If
End If
Next a
End Sub
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Jeff" wrote in message
...
Hello,
I urgently need help with my VBA procedure. I'm getting the following erro
msg "Run-time '450'
Here's my VBA procedure
Sub trimit()
Dim a As Long
Dim myRng As Range
For a = 7 To 100
x = Mid(Application.Trim(Cells(a, 1).Range), 12, 20)
If a Mod 2 = 0 Then
If Cells(a, 1).Value 0 Then
Cells(a, 2).Value = x
Else
Cells(a, 2).Value = 0
End If
End If
Next a
--
Regards,
Jeff
|