Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Error checking in vb and exe


Reply
 
Thread Tools Display Modes
  #1  
Old 02-14-2005, 03:56 PM
Raggy Raggy is offline
Freshman
 
Join Date: Jun 2003
Location: Doncaster, UK
Posts: 39
Unhappy Error checking in vb and exe


I have built my app in VB5 and it runs just fine, it also compiles to an exe without complaining, but when I run the exe file on its own I get a Run Time error 13, Type Mismatch. Is there an option I can change in VB so that it will highlight these errors in the VB environment instead of having to compile it to an exe and then wonder which part it has stopped at?
Reply With Quote
  #2  
Old 02-14-2005, 04:01 PM
tidy trax tidy trax is offline
Centurion
 
Join Date: Aug 2004
Location: England
Posts: 171
Default

Type:

Code:
Option Explicit

at the top of your files.
__________________
- tidy trax
Reply With Quote
  #3  
Old 02-14-2005, 04:04 PM
Raggy Raggy is offline
Freshman
 
Join Date: Jun 2003
Location: Doncaster, UK
Posts: 39
Default

Thanks, I'll try that.
Reply With Quote
  #4  
Old 02-14-2005, 04:05 PM
Thief_ Thief_ is offline
Freshman
 
Join Date: Feb 2005
Location: Melbourne
Posts: 26
Default

Or setup an On Error routine in every module- this will narrow down the problem.
__________________

Posting Guidelines
Reply With Quote
  #5  
Old 02-14-2005, 04:52 PM
HardCode's Avatar
HardCode HardCode is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Feb 2004
Location: New Jersey
Posts: 3,338
Default

You don't get this error in the IDE when you run the program? If your error handlers are in place, you can go to Tools --> Options and click the General tab. Under the frame for "Error Trapping," select "Break on All Errors"
__________________
DON'T CLICK HERE

Useful forum tags: [VB][/VB], [CODE][/CODE], [HTML][/HTML]
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->