D

DAO (Data Access Objects), 190

data sources, creating, 191-192

data tips feature, 347

data types

Boolean, 37 Byte, 36 changing, 39 consistency in expressions, 54 Currency, 37 data type prefixes, 38 Date, 36 definition of, 29

DefType keywords, 39 Double, 37 Integer, 36 Long, 37 Object, 36 Single, 37 specifying, 36-38 String, 36

user-defined data types,

39-40 Variant, 37

databases. See Access databases DataSeries method, 163 Date data type, 36 date expressions, 68-70 Date function, 69, 362 Date statement, 356 Date$ function, 69, 362

date/time functions, 69,

362-363 DateAdd function, 69, 362 DateDiff function, 69, 362 DatePart function, 69, 362 DateSerial function, 69, 362

DateValue function,

69, 362 Day function, 69, 362 DayDeity function, 103 DDB function, 63, 364 Debug menu commands Add Watch, 345 Clear All Breakpoints, 342 Edit Watch, 346 Quick Watch, 347 Run To Cursor, 343 Step Into, 340, 343 Step Out, 343 Step Over, 343 Toggle Breakpoint, 341

dialogBoxLauncher element (XML) 377

debugging procedures break mode entering, 340-342 exiting, 342 overview, 339-340 breakpoints, setting, 341 compile errors, 338 data tips feature, 347 debugging tips and techniques, 350-352 Immediate window executing statements in, 350 overview, 348 printing data in, 348-349 Locals window, 344 logic errors, 339 overview, 337-338 Quick Watch feature, 347 runtime errors, 338-339 stepping into procedures, 343 stepping out of procedures, 343 stepping over procedures, 343 stepping to cursor, 343 syntax errors, 338 watch expressions, 344-346 Declare statement, 356

declaring arrays dynamic arrays, 41-43 multidimensional arrays, 44 one-dimensional arrays, 44 variables, 33-35

explicit declarations,

35-36 implicit declarations, 35

default drive, changing, 315 default folders changing, 315 referencing, 214 Default property (CommandButton object), 249 DefBool statement, 356 DefByte statement, 356 DefCur statement, 356 DefDate statement, 356 DefDbl statement, 356 DefInt statement, 356 DefLng statement, 356 DefObj statement, 356 DefSng statement, 356 DefStr statement, 356 DefType keywords, 39 DefVar statement, 356 Delete command (Edit menu), 245

Delete method

Attachment object, 229 Mailltem object, 222 MAPIFolder object, 217 Range object, 128-129 Recordset object, 207 Worksheet object, 152

DeleteAll procedure, 143 DeleteFolder procedure,

317-318 DeleteSetting statement, 307, 357

deleting application settings from

Registry, 307 controls, 245 files, 315-316 folders, 316-318 records, 207-208

text (Word), 128-129 watch expressions, 346 DeletingARecord procedure, 207 Description property (Err object), 330

Developer tab, displaying, 16 dialog box launchers

(Ribbon), creating, 289 dialog boxes. See also forms Add Procedure, 20 Add Watch, 345 Create Digital Certificate,

304-305 Create New Data

Source, 192 Customize Keyboard, 9 displaying, 83-87 Edit Watch, 346 Export File, 300 Import File, 300 input boxes, 50-51 Insert Function, 26-27 Macro, 8-9, 21-22 Macro Options, 11 Macros, 8-9 message boxes creating, 45-46 message styles, 46-48 return values, 48-49 Microsoft Office Security

Options, 302 Modify Button, 12 ODBC Microsoft Access

Setup, 192 Quick Watch, 347 Record Macro, 5, 7 Select Certificate, 305 Select Database, 192 Tab Order, 247 Trust Center, 302-303 dialogBoxLauncher element (XML), 289

378 Index

Dialogs property (Application object)

Dialogs property (Application object), 83-87

Digital Signature command (Tools menu), 305

digital signatures, 304-305

Dim statement, 33-34, 357

Dir function, 310-312, 363

Dir$ function, 363

directories. See folders disabling error traps, 330

Display method, 86, 222

displaying

Developer tab, 16 dialog boxes, 83-87 forms, 258

status bar messages, 82

DisplayName property

(Attachment object), 229 DisplaySentenceLengths procedure, 134-135 Divide function, 326-327 dividends, 55

DivideNumbers procedure, 331-332

division operator (/), 55

divisors, 55

dlLaunchlnsertHyperlink Dialog_OnAction procedure, 289

Do...Loop statement,

105-106, 357 DocTooLong function, 102 Document object, 73, 115

Close method, 121 Range method, 125 Save method, 119 SaveAs method, 120 documents (Word)

ActiveDocument object, 116 backing up, 122-124

closing

Close method, 121 closing all documents, 121-122 creating, 118 Document object, 115 Documents object, 115 hiding, 319 macro-enabled documents/templates, creating, 265-267 opening with Open method, 116 with RecentFiles object, 116-117 Paragraph object, 136-138 Range object, 125 Bold property, 126 Case property, 126 Delete method,

128-129 deleting text, 128-129 Font property, 126 formatting text, 126 InsertAfter method, 127 InsertBefore method, 127 inserting text, 127-128 InsertParagraph method, 127 InsertParagraphAfter method, 127 InsertParagraphBefore method, 127 InsertParagraphsAnd Text procedure, 127-128 Italic property, 126 reading and changing range text, 126 returning with Range method, 125 returning with Range property, 125

saving, 118

Save method, 119 SaveAs method, 120 Selection object

Collapse method, 132 collapsing selection, 132 creating, 129 extending selection,

131-132 MoveEnd method, 130 MoveStart method, 130 moving insertion point, 130 overview, 129 Type property, 129 Sentences object, 133-135 ThisDocument object, 116 word count, testing, 102 Words object, 132-133 documents (XML). See also RibbonX elements checkBox, 281 comboBox, 288 dialogBoxLauncher, 289

dropdown, 284 gallery, 285-287 group, 274-275 menu, 278

Relationship, 265, 269 ribbon, 271 splitButton, 280 tab, 272-273 tabs, 271

toggleButton, 282-283 MyRibbon.xml file adding to document package, 268-269 creating, 267-268 renaming and opening, 269

Documents collection

Add method, 118 Open method, 116

Err object 379

Documents object, 73, 115 DoEvents function, 366 DoNotSaveChanges_ OnAction procedure, 279

Double data type, 37 drives, changing default drive, 315 drop-down lists (Ribbon), creating, 284-285

dropdown element

(XML), 284 Duplicate method, 181 dynamic arrays, 41-43

0 0

Post a comment