Does anybody know how to get a valid, full filepath from a user. i.e. Getting the user to browse through the 'SaveAs' dialog box, chose an appropiate file, and that the chosen file is returned as a full-filepath, not just a file name.
The easiest way to get a filename is to use the MSComDlg.ocx CommonDialog control which returns a 'FileName' containing the full path and file name the user selected.
If you're trying to use office automation then you can capture events by using a class module.
Both the Application.GetSaveAsFilename and Application.GetOpenFileName methods return the full path, and are very easy to use. I don't know if they are available in every VBA-enabled application, but they should be there in all MSOffice applications.
Rob
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.