
Variables, Data Types, and Constants 247
window. If you have entered the code correctly, you will find that the sheet tabs display
the new names that the macro assigns them. You can check the font size and color by
typing your name in any cell in the A1:G1 range in each of the three sheets.
Try It
Add one extra line of the VBA code for each sheet in the Red_Green_Blue macro.
For Sheet1, add the following line to make the font type bold:
Sheet1.Range(“A1:G1”).Font.Bold = TRUE
For Sheet2, add a line to make the font italic, and for Sheet3 the line should make
the font strikethrough. Run your macro to test your modifi cations.
Variables, Data Types, ...