Join Dennis Taylor for an in-depth discussion in this video Testing a macro in Step mode, part of Excel 2010: Macros in Depth.
- View Offline
- Exercise Files
A key concept in any programming language is the idea of testing and…then debugging a macro.…Macros, of course, despite our wishes, don't always work the way we want them…to. And sometimes it's a huge leap-- and it's even a dangerous leap--to say well,…I've tried my macro, or I think I have it all set up,…I'll just run a macro on all my data and hope it works.…In this particular workbook there is a macro already written that is set up…to handle the data.…Pressing Alt+F11 here. Here's the code.…
We want to, one by one, take each set of data, copy it into column D, transpose…it, come along and do the next record, and so on, and so on, and so on.…We're ready to try this, but should we really try this on all of our data? Answer:…no! And particularly if your macro is manipulating lots of data and possibly…deleting data--and as a general rule of thumb I would suggest that if you do…have a macro that's about to delete data, back up your data first.…Things go wrong sometimes, and programmers have almost a fatalism that says if…
- Understanding what a macro does
- Recording and adding functionality to a macro
- Running macros
- Creating non-recordable VBA code
- Testing a macro in Step mode
- Joining two macros
- Using loop structures
- Streamlining macros
- Creating a Personal Macro Workbook
Skill Level Intermediate
1. Getting Started
2. Running a Macro (Execute, Play Back, Etc.)
3. Using Visual Basic for Applications (VBA)
Viewing the VBA components6m 50s
4. Recording a Macro in Stages
Recording a simple macro5m 52s
5. Creating Non-Recordable VBA Code
6. Macro Project: Converting a Mailing List into a Database List
7. The Personal Macro Workbook
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.