How do I check whether the filename entered in a textbox is valid or not?
In a text box I am entering or selecting the path and filename from local machine or remote machine, once I selected the filename then I want to check if the entered file name is has any invalid charcaters.
I cannot give like textbox = “Selected Path”, because I can select a file from local machine or remote machine but the file name is same.
Why do you want to do it like this? It would be much more intuitive and easy-to-use if you use the Common Dialog Control ActiveX to open the file from a local/remote machine.
EDIT: If you want to check whether the file exists, you can use this function: