Another simple VBA question
Posted by Adam S. on November 21, 2001 2:43 PM
Hi all,
I've been scraping around in the online help but I'm not making much progress.
In a current macro (at the last bit) I have something like the following:
ChDir "C:\"
Workbooks.Open Filename:="C:\Input_File.xls"
This opens the file: Input_File.xls off the the listed path (this is a simplified example). That was cool enough prior to today, but now things have changed a bit.
The filename will now change on a weekly basis (to something like "Input_File 11-10 - 11-17.xls").
I really have 2 related questions:
Is it possible to have the macro prompt me to choose the file from a directory (and then open it) instead of always attempting to open a hard-coded filename?
Better yet, would it be possible to have the macro search in the specified directory for any file that begins with "Input_File"? -(this would be the only file in that directory that would begin in that specific way)
Any help will be appreciated
Thanks all!
Adam