I am trying to automate a process where I download orders from a web site in an Excel spreadsheet, then copy the transactions to another sheet which has macros that reformat the data and save them as a fixed-length text file. Problem is - I don't know what the file name is going to be (it is different every time you download).
If I know what folder to look in, is there a way using VBA to read in the file name and save to a variable that I can use to open the file? I plan on only having one file in this folder at any given time - I plan to have my routine clean up after itself when I am done. I figure it will probably be easier to write the routine if I know that I can just look in the folder and grab whatever Excel file it sees out there. I'm just not sure how to go about writing it.
Any help appreciated.
Thanks!
Alan
If I know what folder to look in, is there a way using VBA to read in the file name and save to a variable that I can use to open the file? I plan on only having one file in this folder at any given time - I plan to have my routine clean up after itself when I am done. I figure it will probably be easier to write the routine if I know that I can just look in the folder and grab whatever Excel file it sees out there. I'm just not sure how to go about writing it.
Any help appreciated.
Thanks!
Alan