Skip to main content
Home Programming with Excel VBA
Main navigation
  • Home
  • Lists
    Lessons Exercises Badges Patterns Principles
  • Search
  • Login
Lessons
  • + Getting ready
    • What is the course about?
    • Why should you care?
    • How the course runs
    • Working together
    • Gather.Town
    • Using this site
    • Exercises
    • Feedback
    • When you get stuck
    • How to succeed
    • Set up Excel
    • Your professor
    • Let's get into it!
  • Your learning style
  • + Simple programs
    • The first program
    • Writing the first program
    • Adela's turn
    • Generalize
    • Dialogs
    • Numeric expressions
    • Strings
    • Secluded Cells
    • Easy is good
    • Debugging
    • More debugging
    • Another worked example
    • Exercises
  • + Decisions
    • If-then-else
    • Logical operators
    • Multiway
    • Nested ifs
    • Guard pattern
    • Basic validation: strings
    • Basic validation: numeric
    • Better validation
    • Vladidation in C#
    • Exercises
  • + Data analysis
    • Data tables
    • Ranges
    • When Ranges have blank data
    • Processing a Range
    • Normalizing
    • Range validation
    • Exercise walkthrough
    • Validate then process
    • Filtering
    • Min and max
    • Adela programs
    • Exercises
  • + Tips
    • Blocked macros
    • Common errors
    • Excel objects
    • Excel on Macs
    • Rounding numbers
    • Shortcut keys
    • VBA documentation
    • Pseudents

Incremental testing

Tags
Debugging

Say you write a big chunk of code, maybe 50 lines. If there's a bug, it could be anywhere in the 50 lines. When you find the bug, you might have to rewrite a lot of code, especially if the bug is early in the code.

It's easier to find bugs in a small chunk of code, say five lines. So, write code in small chunks. Test each chunk as you go.

Where referenced
Easy is good

DO NOT START HERE

Read the lessons on the left of the screen. All exercises are embedded in the lessons.

Creative Commons Attribution-ShareAlike 4.0      Terms of use