More about the Name AndTime Macro

By the time you finish this book, you'll completely understand how the NameAndTime macro works — and you'll be able to develop more-sophisticated macros. For now, I wrap up the example with a few additional points about the macro:

^ For this macro to work, its workbook must be open. If you close the workbook, the macro doesn't work (and the Ctrl+Shift+N shortcut has no effect).

^ As long as the workbook containing the macro is open, you can run the macro while any workbook is active. In other words, the macro's own workbook doesn't have to be active.

^ The macro isn't perfect. It will overwrite existing text with no warning, and entering the text can't be undone.

^ Before you started recording the macro, you assigned it a new shortcut key. This is just one of several ways to execute the macro.

^ You can enter this macro manually rather than record it. To do so, you need a good understanding of VBA. (Be patient, you'll get there.)

^ You can store this macro in your Personal Macro Workbook. If you do so, the macro is available automatically whenever you start Excel.

^ You can also convert the workbook to an add-in file. (More about this in Chapter 21)

You've been initiated into the world of Excel programming. (Sorry, there's no secret handshake or decoder ring.) I hope this chapter helps you realize that Excel programming is something you can actually do — and even live to tell about it. Keep reading. Subsequent chapters almost certainly answer any questions you have, and you'll soon understand exactly what you did in this hands-on session.

Part II

0 0

Post a comment