Discussion Locked
0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am interested in using Visual Basic to select and open an Excel spreadsheet in a particular directory.
1 reply
There are a couple of ways to do this depending on whether you already know the name of the spreadsheet or not.
If known you can simply use the shell function.
dim retval as long
retval = shell("path_to_Excel filename.xls")
If you don't knowthe filename you can use the Common Dialog control to pop up an open file dialog box to get the file name into a string variable and use the shell function as above substituting the filename variable for filename.xls. Don't forget to leave the spacebetween path_to_excel and the filename variable
Hope this helps
John
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
0 helpful
1 reply
0 helpful
1 reply
0 helpful
1 reply
1 helpful
3 replies
Question
Windows and macOS computers becoming slow or unstable after updates - what should I check first
0 helpful
1 reply