home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,514 of 10,840   
   Raoul Watson to All   
   Re: On Error ... Fails! - Any suggestion   
   18 May 05 23:20:58   
   
   From: WatsonR@IntelligenCIA.com   
      
   "Andy"  wrote in message   
   news:d6d3ol$ja0$1@nwrdmz01.dmz.ncs.ea.ibs-infra.bt.com...   
   > Hi,   
   >   
   > I've got some code which uses various "On Error" statements to try to trap   
   > some errors in VB6. When I try it on one machine (WinXP SP1) it works   
   fine,   
   > but on another machine (WinXP SP2) it fails to trap the error and so the   
   > code fails. e.g.   
   >   
   >   
   > On Error Resume Next   
   > debug.print 3/0   
   >   
   > Would fail on the "debug" line.   
   >   
   > On Error Goto Fred   
   > debug.print 3/0   
   > Fred:   
   >   
   > would also fail on the "debug" line   
   >   
   > Any suggestions??   
   >   
   > Without this basic error trapping the whole application is screwed.   
   >   
   > Thanks   
   >   
   > Andy   
   >   
      
   I believe the debug.print would be outside your program scope. Does it   
   handle it correctly if you do:   
      
   On Error Resume Next   
   x = 3/0   
   Debug.Print "The error handler worked"   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca