Pete has attended:
Excel Advanced course
Macros
How do you "step" macros? i.e. I want to open two files and then interrogate the data, but the files are updated and named differently each week, so I want to have the macro ask for the correct files each time.
RE: Macros
Hi Pete, thanks for your query. You can't really do this using the macro recorder, it involves getting the computer to display the open file dialog box, allowing the user to select the filename required and then passing that to a variable. Unless you're going to tweak the actual code, it's best to open the two files yourself first and then run the macro on the open files.
If you're interested, Google the Excel VBA OpenDialog method for a tutorial on using that object method in your code.
Hope this helps,
Anthony