Templates,+Styles,+and+Macros

=**Templates, Styles, and Macros **=

=*** You must use a new excel workbook for this project. **=

Add a print macro button to the Ribbon.
media type="youtube" key="IeHFcUjyIKo" height="346" width="462" align="center"



=**Protect your document, workbook, or presentation with passwords, permission, and other restrictions **=

=**Calendar Templates 2010 **=

=**Find Help on using the Visual Basic Editor**=

=

 * TIP **–The primary advantage to creating and applying styles is that you can modify the style. Excel updates all cells for which you applied the style automatically. Custom styles may also be merged from one workbook to another workbook.=====

**Cell Styles gallery**–Contains five predefined cell categories:

 * =====**Good, Bad, and Neutral:** Use to emphasize bad, good, or neutral results=====
 * =====**Data and Model:** Use to indicate special cell contents, such a calculated result, input cell, output cell, or warning=====
 * =====**Titles and Headings:** Use to format titles and headings, such as column and row labels, for emphasis=====
 * =====**Themed Cell Styles:** Use Accent styles for visual emphasis. These cell styles are dependent on the currently selected theme.=====
 * =====**Number Format:** Provide the same formatting as commands in the Number group on the Home tab=====

Custom Template –Workbook you create and save as a template. When you create the template from scratch, adhere to the following guidelines:

 * =====A template should contain formatted, descriptive labels, empty cells, and formulas.=====
 * =====Use cell references instead of values where possible.=====
 * =====Use an appropriate function to trap errors.=====
 * Include data-validation settings (valid data rules, warning messages, input messages).

=

 * TIP – **Formulas used in workbooks display zeros or error messages when values are removed. Use the IFERROR function to check a cell to see if it contains errors or if a formula will result in an error. If no error exists, the IFERROR function returns the value of the formula. You can enter an argument in the function to display a customized error message instead of a default error, such as #DIV/0! You can also set validation rules so template users will enter correct data.=====

=

 * TIP – **Make sure you save a custom template in the correct folder: C:\Users\//user_name//\AppData\Roaming\Microsoft\Templates in Windows 7, C:\Users\//user_name//\AppData\Local\Microsoft\Templates in Windows Vista, and C:\Documents and Settings\//user_name//\Application Data\Microsoft\ Templates in Windows XP. Templates use a different file extension (.xltx) than an Excel workbook (.xlsx).=====

=

 * TIP **–Protected worksheets require passwords. Passwords can be up to 255 characters, including letters, numbers, and symbols, and are case sensitive. Record your password in a secure location or select a password that you will always remember. If you forget the password, you will not be able to unprotect the worksheet.=====

=

 * Protect a workbook**–Prevents users from inserting, deleting, renaming, moving, copying, and hiding worksheets within the workbook by protecting the workbook with a password. Protecting an entire workbook does not disable the unlocked cells within a workbook.=====

=

 * TIP **–The default Excel Workbook file format (.xlsx) cannot store macros. When you save a workbook containing macros, click the //Save as type// arrow in the Save As dialog box, and select one of the following file formats that support macros:=====

=

 * Macro Recorder**–Tool that records a series of commands in the sequence performed by a user and converts the commands into programming syntax. Remember that once a macro is started, every action taken is recorded in the macro including errors. Here are some tips:=====
 * =====Practice the steps before starting the macro so that you know the sequence of stops when you record the macro.=====

**•** Ensure your macros are broad enough to apply to a variety of situations or an action you perform often for the workbook.

 * =====Determine whether cell references should be relative, absolute, or mixed if you include cell references in the macro.=====

=

 * TIP **–By default, when you select cells when recording a macro, the macro records the cells as absolute reference. If you want flexibility in that commands are performed relative to the active cell when you run the macro, click the Macros arrow in the Macros group on the View tab, and then select Use Relative References //before// you perform the commands. Relative references look like this in the Visual Basic Editor (VBE): ActiveCell.Offset(3,-2).Range("A1").=====

=

 * TIP **–When you do not have VBA skills, create a temporary macro, record the commands needed, copy the code in the VBA window, and paste it in appropriate location in primary macro code. Do this until you are comfortable writing new programming code in VBA.=====

=

 * Macro Security**–The proliferation of Excel macro viruses has made it dangerous to open workbooks that contain macros therefore Excel automatically disables the macros and displays a security warning message that macros have been disabled=====