473,382 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Catching errors

Hi all,
I must be going round the twist here. I have a simple
basic modual with the following code:

Public Sub CreateDir()
On Error GoTo MakeErr
MkDir "c:\Temp\Symbols"
Exit Sub

MakeErr:
Dim result
result = MsgBox("ERROR!", vbOKOnly)
Exit Sub
End Sub

ie if the folder already exists, then report so and continue.

In reality, if the folder does exists, then I get the usual Path/File
Access error, my routine by-passed and program terminates. Am I missing
something here?

I'm using VB6 on NT.
TIA
GST
Jul 17 '05 #1
1 2163
GetAttr first - fronted as DirExists

On Tue, 10 Feb 2004 14:43:51 -0000, "Geoff Turner"
<g.********@rl.ac.uk> wrote:
Hi all,
I must be going round the twist here. I have a simple
basic modual with the following code:

Public Sub CreateDir()
On Error GoTo MakeErr
MkDir "c:\Temp\Symbols"
Exit Sub

MakeErr:
Dim result
result = MsgBox("ERROR!", vbOKOnly)
Exit Sub
End Sub

ie if the folder already exists, then report so and continue.

In reality, if the folder does exists, then I get the usual Path/File
Access error, my routine by-passed and program terminates. Am I missing
something here?

I'm using VB6 on NT.
TIA
GST


Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Florian Fredegar Haftmann | last post by:
Hi! I'm working on a tool which helps in testing applications with web-frontends (on Windows) On thing I would like to test ist the occurence of JavaScript errors; the idea is that the test...
2
by: PapaBear | last post by:
Hi y'all, I'm handling Apache errors through seperate shtml files. That surely looks better than the standard error pages by the browser etc. I did this by coding in httpd.conf lines like: ...
2
by: fred | last post by:
Hello, I read a file from several classes and want to catch an EOF when it appears. Having caught the EOF I want to allow the final part of the program to continue rather than just exiting. ...
7
by: cmay | last post by:
FxCop complains every time I catch System.Exception. I don't see the value in trying to catch every possible exception type (or even figuring out what exceptions can be caught) by a given block...
0
by: R. MacDonald | last post by:
Hi, I have a VB.Net application that dynamically calls unmanaged routines in a DLL that has been created by Fortran (DVF v5). The call to the DLL routine is within a Try/Catch block, but when...
2
by: Eric Lilja | last post by:
Hello, consider this complete program: #include <iostream> #include <string> using std::cout; using std::endl; using std::string; class Hanna {
1
by: Hari Sekhon | last post by:
I've written an except hook into a script as shown below which works well for the most part and catches exceptions. import sys def myexcepthook(type,value,tb): do something ...
4
by: John Pye | last post by:
Hi all I have some C code that is giving me some 'nan' values in some calculations. The C code is wrapped using SWIG to give me a Python module that I am then exercising through a unittest...
25
by: JJ | last post by:
I only want to catch 404 errors at the application level (the rest are will be handled by the customerrors section of the web.config). How do I check for the error code in the Application_Error...
3
by: john | last post by:
I wrapped some fortran code using F2PY and need to be able to catch fortran runtime errors to run the following: # "grid" is a wrapped fortran module # no runtime errors incurred when run with...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.