Hi,
Does anybody know how to write an "import data" script where the users would select files with a File -> Open interface? thanks!
Hi,
Does anybody know how to write an "import data" script where the users would select files with a File -> Open interface? thanks!
Hello MasterMonk,
Do you want the user to select files from the "Open" dialog and then import the file (assuming it is text) into a Workbook?
Sincerely,
Leith Ross
Leith
Actually I didn't want to complicate the question too much, but there are 6 files that they need to select and import into separate workbooks. The import part I have under control.
I just want to know how to create the "browse for files"-type interface that will return the path of the files to be imported into a text box.
Andy
Hello Andy,
This code will bring up the "Open" dialog in the directory of your choice. The user can then select the file, and the dialog will return the user's choice as string. Just set the variable "MyDirectory" to the folder that contains the file. Be sure to use the full folder path. If the user Cancels a message box is display to tell you that. The function returns either the ful path of the file or an empty string.
Calling Example:![]()
Please Login or Register to view this content.
ImportFileName = SelectFile
Sincerely,
Leith Ross
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks