From the course: Excel: Macros and VBA for Beginners
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Stepping through the code - Microsoft Excel Tutorial
From the course: Excel: Macros and VBA for Beginners
Stepping through the code
- Now we've got a recorded macro. That code is somewhere. So, let's look at the code and step through the code, and I'm going to point out some highlights. We're not going down into the weeds, we're just going to look at it from a high level. We're in the file, Step Through.xlsm, and remember, xlsm means that this is an Excel workbook that has a macro in it. Now, when you open it, you might get a yellow bar saying that macros have been disabled. That's the safety feature, and if you trust the workbook that's given you the yellow bar, you can click to enable macros. Now, let's talk about stepping through code. It's pretty neat. It allows you to run your code one step at a time and watch what's going on. This can be helpful if you got a macro from somebody else and you want to understand what it does and when different steps happen in the code. It can help with troubleshooting. If a macro is doing something that you aren't expecting or is wrong, you can step through and find the step…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.