Re: ErrorMessage when file is missing

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Cor Ligthert (notmyfirstname_at_planet.nl)
Date: 12/27/04


Date: Mon, 27 Dec 2004 09:13:33 +0100

Reidar,

In VBNet are easier functions for that.

If Not file.exist("H:\dbBil\dbBil.mdb") then; is the one I like the most,
however there is as well

If Fileinfo.exist(("H:\dbBil\dbBil.mdb")

The last class can give a lot of information about files as well.

I hope this helps?

Cor

"reidarT" <reidar@eivon.no>

> Dim Kildefil as object
>
> Kildefil = "H:\dbBil\dbBil.mdb"
>
> if not Dir(Kildefil)) Then
> else
> Msgbox("Can't find file!",msgboxstyle.information,conMelding)
> end if
>
> I get this error when file is missing.
>
> Change form string to type Long is not legal.
> regards
> reidarT
>