C
Caller property, 279
Cancel button, 236-38
canceling events, 207
Caption property. See also Name property CheckBox object, 231 CommandBar object, 251 CommandButton object, 194 OptionButton object, 230 UserForm object, 227-28
cars calculating monthly loan payments, 210-16 listing for consideration, 216-20
cell references A1-style vs. R1C1 style, 110-11 building formulas using addresses, 114-16 relative vs. absolute, 115
cells, worksheet. See also worksheet absolute references, 115 comparing ranges via CompareCells macro, 150-52 filling, 33-37 merging vertically via menu command, 9-10 merging vertically via recorded macro, 10-12 MoveRight macro, 142-44 multiple, 92 overview, 51 relative references, 115 in worksheets, 52
Cells collection, 94
Cells property, 92-94
certificates. See self-signed certificates
ChangeChart macro, 84-85
ChartArea object, 87
ChartFillFormat object, 87
Chart object vs. ChartObject object, 84 exploring attributes, 78-87 overview, 77-78
ChartObject object Activate method, 83 vs. Chart object, 84 as container, 83-84
ChartObjects collection, 85
Chart property, 86
charts changing type, 79 creating by recording macros, 78-79 embedded, 78-84 formatting, 87 modifying attributes, 84-85 naming, 86 possible locations, 80 as separate sheets, 80 synchronizing, 85-87 value axis, 87
Charts collection, 80
chart tips, 270
ChartType property, 79
Chart Wizard, 268-70
check boxes, implementing, 248. See also CheckBox object
CheckBox object Accelerator property, 231 adding to user forms, 231-33 Caption property, 231 Name property, 231
CheckFiles macro, 178-81
CheckRun macro, 147-48
child windows, 57
classes, 90-91
clearing borders, 105
Click event, 198
Close method, 58-59
closing databases, 45-46 workbooks, 58-59
collections adding items, 71 Add method, 251 creating subcollections, 65-66 Item property, 59 methods overview, 54 multiple worksheets, 65-66 overview, 52 properties overview, 60 referencing, 60 worksheets as, 52
colon (:) in arguments, 17 for macro labels, 179 for separating statements in Immediate window, 150
color constants, 75
ColorFormat object, 73
ColorIndex property vs. Color property, 105 Interior object, 105-7 vs. SchemeColor property, 106
color palettes, 107
Color property vs. ColorIndex property, 105 Interior object, 106 vs. RGB property, 106
colors, changing available palette, 107
Colors collection, 107
Colors dialog box, 74
ColumnCount property, 219
column fields, 134
ColumnFields collection, 130
ColumnRange property, 135
columns, worksheet. See also PivotTable changing width, 94-95 hiding dynamically, 243-46 overview, 51
Columns collection, 94-95
Columns property, 94-95
Column Width property, 220
ComboBox object adding to worksheets, 217-18 BoundColumn property, 219 ColumnCount property, 219 Column Width property, 220 event handler for, 221 Font property, 218 LinkedCell property, 222 ListFillRange property, 219 Style property, 217-18
CommandBar object adding to worksheets, 251 BeginGroup property, 251 Caption property, 251 OnAction property, 251 Style property, 251
command bars. See CommandBar object; menu bars
CommandBars collection, 251
CommandButton object. See also command buttons Accelerator property, 236 Caption property, 236 Default property, 236 Name property, 236 TakeFocusOnClick property, 195
command buttons. See also CommandButton object adding to user forms, 236-38 adding to worksheets, 192-95 Cancel button, 236-37 creating, 192-95 default, 236 linking to macros, 196-98 making responsive to mouse movements, 198-200 naming, 193-94 overview, 192 vs. WordArt text, 275-78
comments, VBA, 8
CompareCells macro, 150-52
compiler errors, 170
Complete Word command, 96
conditionals. See also loops in CheckRun macro, 147-48 Do Until statement, 155 If structure, 146 in MoveRight macro, 142-44 and MsgBox function, 146-48 overview, 141 in TestInput macro, 144-46 in UnprotectSheets macro, 150
confirmation prompts, hiding, 47
containers, 84
Controls collection, 251
Control Toolbox Check Box button, 231 Combo Box button, 217 Command Button button, 192 illustrated, 192 overview, 192 Properties button, 193 Scroll Bar button, 215 Spin Button button, 212 Text Box button, 231 View Code button, 196
ConvertToValues macro, 16-18
copying worksheets, 65
Copy method Selection object, 17 Worksheets object, 65
counting workbooks, 57-58
Count property, 61-62
CreatePivotTable method, 125
Ctrl key, 7
currency format, creating macro for, 5-6
Currency Style button, 4-5
CurrentPage property, 130
CurrentRegion property, 116
custom forms. See user forms
custom functions adding arguments, 165-67 creating, 164-65 making arguments optional, 168 making volatile, 168 overview, 164 running from macros, 169-70 StartOfMonth function, 234-35 vs. Sub procedures, 170 testing, 235 vs. variables, 164 worksheet cell limitations, 170
custom properties, 206-7
CutCopyMode property, 17 |