Hi,

I am using a dialog box where user selects a XML file from the local drive. The selected file along with the folder path is displayed in a textbox on the form. The user can now edit the textbox. On click on 'Proceed' button, I am parsing that xml file.

Now if the user edits the folder path(gives a folder path which does not exist) the application throws an error. How to check wheteher that folder path exists in the local drive or not???.
If it does not exists then a message box with error message should be shown to the user.

Please help!....

Regards,
Dinil

Dim fso As New FileSystemObject
dim Exists as boolean
Exists = fso.FolderExists(strFolderName)

if exists=True then
'the folder path exists
else
'does not exists
endif

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.