<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Debug my app... an error on my form in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092883#M22833</link>
    <description>I have a call to myuserform.show in my main module.&lt;BR /&gt;
If an error occurs in setting up the form, if I hit the Debug button the debugger takes me to the myuserform.show line that is in my main module... &lt;BR /&gt;
Why doesn't it take me to the actual line of code that sparked the error?  Is there some setting I should make that will cause it to highlight the line of code that caused the error?</description>
    <pubDate>Tue, 16 Oct 2007 12:57:22 GMT</pubDate>
    <dc:creator>mdhutchinson</dc:creator>
    <dc:date>2007-10-16T12:57:22Z</dc:date>
    <item>
      <title>Debug my app... an error on my form</title>
      <link>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092883#M22833</link>
      <description>I have a call to myuserform.show in my main module.&lt;BR /&gt;
If an error occurs in setting up the form, if I hit the Debug button the debugger takes me to the myuserform.show line that is in my main module... &lt;BR /&gt;
Why doesn't it take me to the actual line of code that sparked the error?  Is there some setting I should make that will cause it to highlight the line of code that caused the error?</description>
      <pubDate>Tue, 16 Oct 2007 12:57:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092883#M22833</guid>
      <dc:creator>mdhutchinson</dc:creator>
      <dc:date>2007-10-16T12:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Debug my app... an error on my form</title>
      <link>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092884#M22834</link>
      <description>what makes you think that the line of code causing the error isnt the line &lt;BR /&gt;
it took you to?&lt;BR /&gt;
&lt;BR /&gt;
can you show several lines before and after that particular line?&lt;BR /&gt;
&lt;BR /&gt;
&lt;HUTCH&gt; wrote in message news:5750774@discussion.autodesk.com...&lt;BR /&gt;
I have a call to myuserform.show in my main module.&lt;BR /&gt;
If an error occurs in setting up the form, if I hit the Debug button the &lt;BR /&gt;
debugger takes me to the myuserform.show line that is in my main module...&lt;BR /&gt;
Why doesn't it take me to the actual line of code that sparked the error? &lt;BR /&gt;
Is there some setting I should make that will cause it to highlight the line &lt;BR /&gt;
of code that caused the error?&lt;/HUTCH&gt;</description>
      <pubDate>Tue, 16 Oct 2007 13:14:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092884#M22834</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-10-16T13:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Debug my app... an error on my form</title>
      <link>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092885#M22835</link>
      <description>VABIDE-menu Tools-&amp;gt;Options...-&amp;gt;Tab "General"-&amp;gt;radio button "BreaK on all &lt;BR /&gt;
errors"&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;HUTCH&gt; wrote in message news:5750774@discussion.autodesk.com...&lt;BR /&gt;
I have a call to myuserform.show in my main module.&lt;BR /&gt;
If an error occurs in setting up the form, if I hit the Debug button the &lt;BR /&gt;
debugger takes me to the myuserform.show line that is in my main module...&lt;BR /&gt;
Why doesn't it take me to the actual line of code that sparked the error? &lt;BR /&gt;
Is there some setting I should make that will cause it to highlight the line &lt;BR /&gt;
of code that caused the error?&lt;/HUTCH&gt;</description>
      <pubDate>Tue, 16 Oct 2007 14:18:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092885#M22835</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-10-16T14:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Debug my app... an error on my form</title>
      <link>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092886#M22836</link>
      <description>I have experienced the same thing.&lt;BR /&gt;
&lt;BR /&gt;
I dare say if he commented out all the code in the form. He would not receive the error at the line that is trying to show the form.&lt;BR /&gt;
&lt;BR /&gt;
Regards - Nathan</description>
      <pubDate>Tue, 16 Oct 2007 23:04:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092886#M22836</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-10-16T23:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: Debug my app... an error on my form</title>
      <link>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092887#M22837</link>
      <description>I have a form with a specific name...&lt;BR /&gt;
The line of code the debugger took me to is:&lt;BR /&gt;
&lt;BR /&gt;
frmContManager.Show&lt;BR /&gt;
&lt;BR /&gt;
That is the name of my form module.&lt;BR /&gt;
Now... Break on all errors does just that... the debugger breaks on every err whether I have an error handler or not.&lt;BR /&gt;
For instance I have several places where I add items to collections with a specified key. If the key is already in the collection it pops an error... however I have specific error handle in place to assure the code continues. If I set 'Break on all errors' it break on all errors, even these that have error handlers in place.&lt;BR /&gt;
Now if I set the debugger to stop on un-handled errors, which I thought would be the next best setting... but if the error happens in my form module the debugger doesn't take me to the error.  Instead it highlights the &lt;BR /&gt;
frmContManager.Show line of code that happens to be in my main module.&lt;BR /&gt;
&lt;BR /&gt;
Any way thanks all for your thoughts.</description>
      <pubDate>Wed, 17 Oct 2007 11:51:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092887#M22837</guid>
      <dc:creator>mdhutchinson</dc:creator>
      <dc:date>2007-10-17T11:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Debug my app... an error on my form</title>
      <link>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092888#M22838</link>
      <description>"Break on all error" should only used for debugging, unless your code does &lt;BR /&gt;
not apply any error handling (bad, bda thing!).&lt;BR /&gt;
&lt;BR /&gt;
In your case, set to "Break on all error" is only to help you see what cause &lt;BR /&gt;
the error. You have obviously unhandle error in the user form module. Most &lt;BR /&gt;
likely, you used "On Error Resume Next", but did not handle all possible &lt;BR /&gt;
runtime error for EACH line of code.&lt;BR /&gt;
&lt;BR /&gt;
So, use "Break on all error" to thoroughly testing your code for all &lt;BR /&gt;
possible exceptions, and make sure you handle it. If your "On Error resume &lt;BR /&gt;
Next" and testing error after certain line of code could miss possible &lt;BR /&gt;
exception, you need to use "On Error Go To" to catch all exception, handle &lt;BR /&gt;
it, then decide you want to "Resume" or "Exit". Do not use "Break on all &lt;BR /&gt;
error" in production run, unless you are sure there is no exception to &lt;BR /&gt;
catch.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;HUTCH&gt; wrote in message news:5751924@discussion.autodesk.com...&lt;BR /&gt;
I have a form with a specific name...&lt;BR /&gt;
The line of code the debugger took me to is:&lt;BR /&gt;
&lt;BR /&gt;
frmContManager.Show&lt;BR /&gt;
&lt;BR /&gt;
That is the name of my form module.&lt;BR /&gt;
Now... Break on all errors does just that... the debugger breaks on every &lt;BR /&gt;
err whether I have an error handler or not.&lt;BR /&gt;
For instance I have several places where I add items to collections with a &lt;BR /&gt;
specified key. If the key is already in the collection it pops an error... &lt;BR /&gt;
however I have specific error handle in place to assure the code continues. &lt;BR /&gt;
If I set 'Break on all errors' it break on all errors, even these that have &lt;BR /&gt;
error handlers in place.&lt;BR /&gt;
Now if I set the debugger to stop on un-handled errors, which I thought &lt;BR /&gt;
would be the next best setting... but if the error happens in my form module &lt;BR /&gt;
the debugger doesn't take me to the error.  Instead it highlights the&lt;BR /&gt;
frmContManager.Show line of code that happens to be in my main module.&lt;BR /&gt;
&lt;BR /&gt;
Any way thanks all for your thoughts.&lt;/HUTCH&gt;</description>
      <pubDate>Wed, 17 Oct 2007 14:02:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092888#M22838</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-10-17T14:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Debug my app... an error on my form</title>
      <link>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092889#M22839</link>
      <description>These appear to be good thoughts.&lt;BR /&gt;
Thanks</description>
      <pubDate>Fri, 19 Oct 2007 21:42:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/debug-my-app-an-error-on-my-form/m-p/2092889#M22839</guid>
      <dc:creator>mdhutchinson</dc:creator>
      <dc:date>2007-10-19T21:42:18Z</dc:date>
    </item>
  </channel>
</rss>

