Solved

Problems with "On Error"

Posted on 2003-10-21
2
171 Views
Last Modified: 2010-05-01
Hi!

I'm developing an application under Visual Basic 6.0 and I'm not able to manage errors. It seems that VB doesn't allows me to take control on errors.

I've tried with On Error Goto <name_of_label>, On Error Resume Next... but when an error occurs, the application stops showing the error.

For example, with this code:
--------------------------------
On Error Resume Next

Err.Raise cdlCancel

MsgBox "Error number: " & cdlCancel
--------------------------------

The application stops on the "err.raise" line (the same happens if I use a label to handle the error)

Can anybody help me?

Thanks!
0
Comment
Question by:shalmorion
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 70 total points
ID: 9591798
Hi shalmorion,

Is this in the IDE or a compiled application? In the IDE you can set whether the application reacts in this way independently of any error handling you have, right-click the main code window, choose "Toggle" then see what is displayed for the error handling. You may have "Break on all errors" set. This will display the error message even if you have error handling.

Tim Cottee MCSD, MCDBA, CPIM
Brainbench MVP for Visual Basic
http://www.brainbench.com
0
 

Author Comment

by:shalmorion
ID: 9592297
Thanks a lot, TimCottee!!! I didn't knew this option.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA to copy paste columns form one file to other 20 87
MsgBox 2 54
Sending a email via excel using vba 6 79
VBA: Select SQL query based on a config Sheet v2 11 44
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question