Re: Help with Error Handlers!!!
- From: "Bob Phillips" <bob.NGs@xxxxxxx>
- Date: Mon, 7 Aug 2006 20:36:09 +0100
That first example does not throw an error as the object is not declared, so
it is interpreted as a string and compared against "Nothing" and succeeds.
--
HTH
Bob Phillips
(replace xxxx in the email address with gmail if mailing direct)
"Conan Kelly" <CTBarbarin at msn dot com> wrote in message
news:egpfeJluGHA.5044@xxxxxxxxxxxxxxxxxxxxxxx
bob,comments). I intentionally had that in there to trigger a
Thanks for the feed back, but please re-read the post.
I already knew that this syntax is incorrect (I stated that in the
legitimate error. That is not where the problem lies. When I have thisincorrect syntax in the code, the error handler works
correctly, BUT when I use [Ctrl] + [Break], the error handler does notwork correctly.
news:Osi9ODluGHA.3364@xxxxxxxxxxxxxxxxxxxxxxx
Any more thoughts on the matter will be greatly appreciated,
Conan
"Bob Phillips" <bob.NGs@xxxxxxx> wrote in message
THEIf mrngCurrRange Is Nothing Then
--
HTH
Bob Phillips
(replace xxxx in the email address with gmail if mailing direct)
"Conan Kelly" <CTBarbarin at msn dot com> wrote in message
news:Ov6t2xkuGHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
Hello all,NUTS!!!!!!!!!!!!!!!!!!!!!!!!
Using Excel 2002 (10.6501.6626) SP3
AAAAAAAAHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!! THIS IS DRIVING ME
finally narrowed it down to this:
I've been working on this for several days now and I think that I have
[Ctrl] + [Break]?
How can I get this to work correctly when I interrupt execution with
With the following code, the error handler works correctly:
Sub PasteReplaceNulls()
On Error GoTo PasteReplaceNulls_Err
Application.EnableCancelKey = xlErrorHandler
If mrngCurrRange = "Nothing" Then
' I KNOW THIS SYNTAX IS INCORRECT. I'VE ALREADY FOUND OUT
&CORRECT SYNTAX. This is just here to trigger a
legitimate error.hence the need for "Application.EnableCancelKey =
End If
'Statements that will cause the macro to run for a long time,
xlErrorHandler" above
PasteReplaceNulls_Err:
MsgBox ActiveWorkbook.Name & vbCrLf & Active***.Name & vbCrLf
&Selection.Address
[Break], the error handler does not work correctly. Instead, I
Exit Sub
End Sub
BUT with the following code AND INTERRUPTING EXECUTION WITH [Ctrl] +
get this error message:http://home.att.net/~ctbarbarin/files/progress_error.jpg
hence the need for "Application.EnableCancelKey =
Sub PasteReplaceNulls()
On Error GoTo PasteReplaceNulls_Err
Application.EnableCancelKey = xlErrorHandler
'Statements that will cause the macro to run for a long time,
xlErrorHandler" above
PasteReplaceNulls_Err:
MsgBox ActiveWorkbook.Name & vbCrLf & Active***.Name & vbCrLf
Selection.Address
[Ctrl] + [Break]?
Exit Sub
End Sub
How can I get this to work correctly when I interrupt execution with
--
Thanks for any help anyone can provide,
Conan Kelly
.
- Follow-Ups:
- Re: Help with Error Handlers!!!
- From: Conan Kelly
- Re: Help with Error Handlers!!!
- References:
- Help with Error Handlers!!!
- From: Conan Kelly
- Re: Help with Error Handlers!!!
- From: Bob Phillips
- Re: Help with Error Handlers!!!
- From: Conan Kelly
- Help with Error Handlers!!!
- Prev by Date: Re: Return to Original Workbook
- Next by Date: SendKeys Help
- Previous by thread: Re: Help with Error Handlers!!!
- Next by thread: Re: Help with Error Handlers!!!
- Index(es):