98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » Macros
Macros
Resolved · Low Priority · Version 2003
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
Mon 10 Jan 2011: Automatically marked as resolved.
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Using Excel's MODE functionUse Excel's MODE function to display the most common value present in a particular range of cells. |