First Things First

Before you can call yourself an Excel programmer, you must go through the initiation rites. That means you need to make a small change so Excel will display a new tab at the top of the screen: Developer.

When you click the Developer tab, the Ribbon displays information that is of interest to programmers (that's you!). Figure 2-1 shows how the Ribbon looks when the Developer tab is selected.

Figure 2-1:

The Developer tab is normally hidden, but it's easy to unhide.

Figure 2-1:

The Developer tab is normally hidden, but it's easy to unhide.

The Developer tab is not visible when you first open Excel; you need to tell Excel to show it. Getting Excel to display the Developer tab is easy (and you only have to do it one time). Follow these steps:

1. Choose OfficeOExcel Options.

So now you're asking me: "Where is that Office tab you're talking about?" Well, the answer is: There isn't an Office tab. Microsoft has introduced a new graphic element into the user interface, called the Office Button. It is a round button on the top-left side of the Excel application window. Clicking that icon (or pressing Alt+F) is what opens the Office menu.

2. In the Excel Options dialog box, select Personalize.

3. Place a check mark next to Show Developer tab in the Ribbon.

What You'll Be Doing

After you read up on the basics, you can start creating your first macro. You switch on the macro recorder and then perform a couple of actions. The macro that you're about to create can:

1 Type your name into a cell.

1 Enter the current date and time into the cell below. 1 Format both cells to display bold. 1 Change the font size of both cells to 16 point.

The macro accomplishes all these steps in a single action. As I describe in the following sections, you start by recording your actions as you go through these steps. Then you test the macro to see whether it works. Finally, you edit the macro to add some finishing touches. Ready?

0 0

Post a comment