Hello, I am starting to understand the shell function, but the error from the shell is the thing I don't get.

I have this
----code----
dim path as string
path = text1.text
shell (path)
----code----

Pretty easy, I have text1 the path. The USER locates the path from a Commondialog.

But sometimes the path isn't found and an error comes up from the shell.

How do I cancle this error and continue on to a diffrent action.

An action like,
If shell(path) = false then
do action here
msgbox ("Path not found please try locating it again")

something like that.

Please help, thank you