• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part 10: Automating Excel > Debugging Macros and Custom Functions

Chapter 33. Debugging Macros and Custom Functions

Using Design-Time Tools 869

Dealing with Run-Time Errors 876

If you have made it through the last two chapters, you now have at least a smattering of Microsoft Visual Basic for Applications (VBA) at your command—as well as, we hope, an appetite for learning more. The best ways to acquire more expertise in this versatile programming language are to read a text on the subject (such as Microsoft Excel 2000/Visual Basic for Applications Fundamentals, from Microsoft Press) and to experiment. As you do your everyday work in Excel, look for chores that are ripe for automating. When you come across something macro-worthy, record your actions. Then inspect the code generated by the macro recorder. Make sure you understand what the recorder has given you (read the Help text for any statements you don't understand), and see whether you can find ways to make the code more efficient. Eliminate statements that appear unnecessary, then see whether the code still does what you expect it to do. Look for statements that select ranges or other objects, and see whether you can make your code perform the essential tasks without first selecting those objects.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint