Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Folder exist , very urgent

Status
Not open for further replies.

mp3nick

Programmer
Feb 10, 2003
14
0
0
MY
hi everybody
I need to check folder existance in my macro but the FolderExist() doesn't work for me from what help file says

can you help me please ?


any help appreciated
thanks
 
This works:
Code:
Dim fs As Object
  
  Set fs = CreateObject("Scripting.FileSystemObject")
  MsgBox fs.FolderExists("C:\MyFolderName")
Clive [infinity]
 
D'you have some more info on what's not working?
If you just need to check whether a folder exists in a specified location you could try
Code:
Dir(<SpecifyDirectoryName>, vbDirectory)

If not, please specify what you need to do with the FileSysObj

Cheers
Nikki
[upsidedown]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top