Mar 2, 2001 #1 bujin MIS Oct 2, 2000 144 GB Is there such a thing? If not, how do I find out if a file exists using Visual Basic for Applications (in Excel)?
Is there such a thing? If not, how do I find out if a file exists using Visual Basic for Applications (in Excel)?
Mar 2, 2001 Thread starter #2 bujin MIS Oct 2, 2000 144 GB Never mind, I got it! I was thinking of Delphi (I think). Just use the Dir() command. Upvote 0 Downvote
Mar 2, 2001 #3 Guest_imported New member Jan 1, 1970 0 You can also use Application.FileSearch, it depends which one you think is easier. Upvote 0 Downvote
Mar 2, 2001 Thread starter #4 bujin MIS Oct 2, 2000 144 GB Well would you look at that! That's simplified the task ten-fold! Thx Dark_Sun! Upvote 0 Downvote
Mar 2, 2001 #5 Psychpt MIS Dec 4, 2000 147 US Dir is the vb way to test if a file or directory exists. HTH Upvote 0 Downvote
Mar 2, 2001 1 #6 JWhyte Programmer Feb 8, 1999 25 GB Or use Scripting.FileSystemObject. i.e. Code: Dim FSO As FileSystemObject Set FSO = New FileSystemObject If FSO.FileExists("<path to file") Then ' Code on existence of file. End If HTH John Whyte jwhyte@skipton.co.uk Upvote 0 Downvote
Or use Scripting.FileSystemObject. i.e. Code: Dim FSO As FileSystemObject Set FSO = New FileSystemObject If FSO.FileExists("<path to file") Then ' Code on existence of file. End If HTH John Whyte jwhyte@skipton.co.uk