macros
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel Training and help » Macros

Macros

resolvedResolved · Low Priority · Version 2003

replyReply Wed 22 Dec 2010, 16:06Delegate Pete said...

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.

For upcoming training course dates see: Pricing & availability

replyReply Tue 4 Jan 2011, 11:37Trainer Anthony said...

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.

 

Please browse our web site to find out more about
excel computer training and other Microsoft training courses.

Excel tip:

Viewing Many Worksheets

If there are more worksheets in your workbook than there is room to show all their tabs at the bottom of the screen - Right click on the navigation arrows. A list of all your worksheets is shown. You just click on the one that you want to access. If you have more than 15 worksheets, select in the list and choose your worksheet from hundreds.

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard