Given the path and name of some file, how can I open it from a user form?
Printable View
Given the path and name of some file, how can I open it from a user form?
It depends what you mean by open it.
If you want to open it in an exteral program e.g. word or excel then use the shell command.
VB Code:
Shell("c:\somefile.xls")
if you want to open it and process it within your application then it really depends on what the file is.
I can't find out why it keeps showing with Shell run time error 5, saying "Invalid procedure call or argument"...