Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Exactly what is accomplished by the line of code seen often in VBA 'On error
Goto 0'? Thanks Brian Tozer |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Brian Tozer" wrote...
Exactly what is accomplished by the line of code seen often in VBA 'On error Goto 0'? Exactly what is accomplished by failing to read online help for the On Error statement other than spending several minutes to several hours waiting for an answer that could have been gotten in a few seconds with the expenditure of a bit of efficient effort? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
From VBA, go to Help - F1 and do a search for "On Error Statement"
On Error Goto 0 switches off error handling. "Brian Tozer" wrote in message ... Exactly what is accomplished by the line of code seen often in VBA 'On error Goto 0'? Thanks Brian Tozer |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If an error occurs in the excution of the code, then execution drops the the
next line after the statement. Thereby trapping the error and allowing execution to continue. Depending on the nature and severity of the error this may or may not be acceptable. Cheers N "Brian Tozer" wrote in message ... Exactly what is accomplished by the line of code seen often in VBA 'On error Goto 0'? Thanks Brian Tozer ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry my statement 'thereby trapping the error' should have read 'thereby
not trapping (ignoring) the error' cheers N "Nigel" wrote in message ... If an error occurs in the excution of the code, then execution drops the the next line after the statement. Thereby trapping the error and allowing execution to continue. Depending on the nature and severity of the error this may or may not be acceptable. Cheers N "Brian Tozer" wrote in message ... Exactly what is accomplished by the line of code seen often in VBA 'On error Goto 0'? Thanks Brian Tozer ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Brian,
it turns off any error handling. Robin Hammond www.enhanceddatasystems.com "Brian Tozer" wrote in message ... Exactly what is accomplished by the line of code seen often in VBA 'On error Goto 0'? Thanks Brian Tozer |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Rob,
I don't think it switches error handling off, it just disables any enabled error handler in the current procedure. In other words, it defaults to the inbuilt (crash and burn) error handling. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rob van Gelder" wrote in message ... From VBA, go to Help - F1 and do a search for "On Error Statement" On Error Goto 0 switches off error handling. "Brian Tozer" wrote in message ... Exactly what is accomplished by the line of code seen often in VBA 'On error Goto 0'? Thanks Brian Tozer |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think the "GoTo 0" part would be confusing to those new to vba. Code use
to have line numbers, and GoTo 0 was the code used to turn error handling off. Seems to me that "GoTo 0" does not make sense anymore. Maybe we should send in a request for a new code to turn it off? Not sure what a good command name would be though. However, vba can still do line numbers, so I don't think Microsoft will be changing it anytime soon. :) Sub Demo() 10 Dim A As Long 20 A = 0 30 A = 100 / A End Sub Glad we don't have to do that anymore! :) -- Dana DeLouis Using Windows XP & Office XP = = = = = = = = = = = = = = = = = "Brian Tozer" wrote in message ... Exactly what is accomplished by the line of code seen often in VBA 'On error Goto 0'? Thanks Brian Tozer |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
AMEN...
|
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Never did figure out how to get line number 10.51 to work. :)
|
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You are right. I actually read what I wrote after I posted and thought
about correcting myself. Having also referred to the Help file I decided not to. "Bob Phillips" wrote in message ... Rob, I don't think it switches error handling off, it just disables any enabled error handler in the current procedure. In other words, it defaults to the inbuilt (crash and burn) error handling. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rob van Gelder" wrote in message ... From VBA, go to Help - F1 and do a search for "On Error Statement" On Error Goto 0 switches off error handling. "Brian Tozer" wrote in message ... Exactly what is accomplished by the line of code seen often in VBA 'On error Goto 0'? Thanks Brian Tozer |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Meaning of On Error Goto 0 | Excel Discussion (Misc queries) | |||
On error from Find, GoTo E | Excel Discussion (Misc queries) | |||
On error goto problem | Excel Discussion (Misc queries) | |||
On Error GoTo skip needs help | Excel Discussion (Misc queries) | |||
On error goto 0 | Excel Programming |