From the course: Excel Copilot: Building and Maintaining VBA Macros

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Challenge: Optimizing an existing macro

Challenge: Optimizing an existing macro

(upbeat music) - [Instructor] In this final challenge for the course, we're going to circle back to our very first macro and take it up a notch. Go ahead and open the exercise file optimizing macro's challenge, and you'll see we've got the same customer data as before and a starter macro. If you're not sure what this macro does, you can watch the challenge and solution video from the first chapter or just ask co-pilot for a quick summary. This time, the focus is on making it more resilient. The idea is to get co-pilot's help in thinking through where the macro might fail, and then adding some defensive programming to keep it from breaking. That could mean adding graceful air handling, or even creating a simple log that records what went wrong so you're never left guessing. Once you've strengthened the VBA version and it feels more reliable, take the next step of refactoring the same logic into an office script. Keep…

Contents