This sounds like BASIC, so why doesn't it look familiar?

  • 2/25/2026

VBA is not really hard

Knowing whether you are dealing with properties or methods helps you set up the correct syntax for your code. Don’t worry if it all seems confusing right now. When you are writing VBA code from scratch, it is tough to know whether the process of changing a cell to yellow requires a verb or an adjective. Is it a method or a property?

This is where the macro recorder is especially helpful. When you don’t know how to code something, you record a short little macro, look at the recorded code, and figure out what is going on.

VBA Help files: Using F1 to find anything

Excel VBA Help is an amazing feature, provided that you are connected to the Internet. If you are going to write VBA macros, you absolutely must have access to the VBA Help topics installed. Follow these steps to see how easy it is to get help in VBA:

  1. Open Excel and switch to the VB Editor by pressing Alt+F11. From the Insert menu, select Module.

  2. Type these three lines of code:

    Sub Test()
      MsgBox "Hello World!"
    End Sub
  3. Click inside the word MsgBox.

  4. With the cursor in the word MsgBox, press F1. If you can reach the Internet, you will see the Help topic for the MsgBox function.

Using Help topics

If you request help on a function or method, the Help topic walks you through the various available arguments. If you browse to the bottom of a Help topic, you can see a great resource: code samples under the Example heading (see Figure 2-1).

FIGURE 2.1

FIGURE 2.1 Most Help topics include code samples.

It is possible to select the code, copy it to the Clipboard by clicking the Copy shortcut in the top-right corner of the code box, and then paste it into a module by pressing Ctrl+V.

After you record a macro, if there are objects or methods about which you are unsure, you can get help by inserting the cursor in any keyword and pressing F1.