Extended Learning Module M – Programming in Excel with VBA
Mod M-18
ASSIGNMENTS & EXERCISES (p. M.28)
1. Automating Repetitive Tasks. Once a week you have to develop a new worksheet for your
department head that inserts enrollment data. More specifically most of the tasks that you
perform in creating the worksheet are very repetitive since the structure of the worksheet
is always the same. You want to automate the steps that are repetitious. Using the Macro
Recorder, create a macro that types six month names as three letter abbreviations, “Jan” to
“Jun,” across the top of a worksheet, starting in cell B1. Make each abbreviate bold, italics,
and centered within each cell. Call the macro MonthNames and assign the macro the
shortcut key Ctrl+Shift+M. Save the workbook as MonthNames.xls. Open a new
worksheet, and press Ctrl+Shift+M.
DISCUSSION:
• Start with an empty worksheet with cell A1 selected.
• If you like to work with toolbars, use View, Toolbars to select and display the Visual