How do I get a File / Open prompt in VBA?
Posted by Chris Rock on November 21, 2001 10:03 AM
I need to import some data from several separate files using a simple Copy/Paste macro. However, I'll need to have a prompt to open the files I'll be using.
How can I do this using VBA?
Steps involved:
1. PROMPT for File / Open (starting in a specific directory)
2. Take Active file (the one just opened), and copy A2:R201.
3. Activate the workbook from where the macro was run.
4. Select the first empty cell in column A.
5. Paste.
6. Close workbook that was opened by the macro.
7. Repeat for other workbooks, pasting in the first empty cell in Column A.
I know how to do everything except have Excel prompt for a file/open. Anyone know how to do this?