Working With The Excel Object Model

An Introduction to the Excel Object Model 64

Using the Object Browser 66

Create an Object Variable 68

Change the Properties of an Object 70

Compare Object Variables 72

Using an Object Method 74

Display a Built-in Dialog Box 76

5) USING VARIABLES AND ARRAYS_

Assign Values to Variables 78

Using Global Variables 80

Declare an Array 82

Declare a Multidimensional Array 84

Convert a List into an Array 86

Redimension an Array 88

Create a User-Defined Data Type 90

6) ADDING CONTROL STATEMENTS_

Execute a Task While a Condition is True 92

Perform Multiple Tasks Until a Condition is Met 94

Execute Tasks a Specific Number of Times 96

Using the For Each Next Loop 98

Conditionally Execute a Group of Statements 100

Execute a Statement Based Upon the Value 102

Jump to a Specific Location in a Macro 104

Conditionally Call a Subroutine 106

USING BUILT-IN FUNCTIONS AND STATEMENTS

Using Excel Worksheet Functions 108

Using the MsgBox Function 110

Using the InputBox Function 112

Retrieve Current Date and Time 114

Determine the Amount of Time Between Dates 116

Format a Date Expression 118

Format a Numeric Expression 120

Remove Extra Spacing from a String 122

Return a Portion of a String 124

Compare Two Strings 126

8) DEBUGGING MACROS

Debugging Basics 128

Debug a Procedure with Inserted Break Points 130

Using Watch Expressions to Debug a Procedure 132

Step through a Procedure 134

Resume Execution if an Error is Encountered 136

Process a Runtime Error 138

9)WORKING WITH OTHER WORKBOOKS AND FILES.

Open a Workbook 140

Open a Text File as a Workbook 142

Open a File Requested by the User 144

Save a Workbook 146

Save Workbook in Format Specified by User 148

Determine if a Workbook is Open 150

Close a Workbook 152

Create a New Workbook 154

Delete a File 156

Find a File 158

0 0

Post a comment