Project VBA Programming
Book Index

 

A

 

Automation

See VBA Automation

B

 

Binary Large Object

388

Bloated files

See Project files

BLOB

See Binary Large Object

C

 

Calendars

See Update Calendars macro

Class Modules

18, 65–69, 319–21, 360

    calling a Class

68

    creating a Class

65–69

    defined

18

    example of using a Class

319–21

    Property Get procedure

66

Property Let procedure

66

    used with Windows API

360

    using a Class

68

Classes

See Class Modules

Code

13, 15, 50, 55, 83–88, 90, 147–48, 197–98, 352–54, 365

    adding code to a UserForm

184–85

    compiling

50

    debugging

83–88

    developing Project database code

365

    entering and editing

13, 83–84

    estimating development time

84

    indenting

55

    maintenance for ease of debugging

90

    maintenance for ease of use

88–90

    modifying recorded code

151

    recording a macro

147–48

    repairing corrupted .mpp files

155–56

    running

83–88

    selecting a module storage location

153–55

    speeding up code execution

352–54

    structuring

55, 197–98

    timing code execution

354

    using Events

189–93

    using IntelliSense

15

    when to record

147

Code Window

See Visual Basic Editor

Comments

23–24

Concatenate text strings

See Data Types - Text data

Consolidated Project

See Consolidated Project Report macro

Consolidated Project Report macro

297–300

    master project defined

297

    using a master project

297–98

    writing the code

299–300

Constants

39–41

    pj constants

41

    vb constants

41

    xl constants

41

Corrupted files

See Project files

Corruption

See Project files

Cost Margin Report macro

289–93

Custom Fields

99–117, 124, 349

    creating Formulas using VBA

349

    defining

103–17

    deleting

124

    overview

99–101

    testing for an NA date value

113

    using a Value List

105–7

    using Formulas

109–13

    using formulas to support Project VBA

102

    using Graphical Indicators

113–17

Custom Outline Codes

119–23, 124

    defined

119

    defining the Code Mask

119–21

    defining the Lookup Table

121–23

    deleting

124

D

 

Data Types

43–50

    converting data

49–50

Date data

43–44

Number data

47–48

Text data

45–47

Variant data

49

Databases

365, 376–82, 387–400

    creating a database View

391

    developing Project database code

365

    importing data from a SQL Server database

379–82

    importing data from an Access database

376–79

    looping through all projects in a database

389–90

    reading data from a database

391–95

    using the pjdb.htm file

387–89

    writing data directly to a database

395–400

DateAdd function

See Data Types - Date data

DateDiff function

See Data Types - Date data

DatePart function

See Data Types - Date data

DateSubtract function

See Data Types - Date data

Digital Certificate

See VBA Security

Do Loop

See Loops - Do Loop

Downloading the sample Project files

3, 95, 366

Driving Tasks macro

211–29

    adding a UserForm

222–26

    designing the main procedure

212–13

    overview

211

    running from a Toolbar

228–29

    understanding task dependencies

213

    understanding the Task Driver code

213–20

E

 

ElseIf statement

See IF statement

Errors

173–77

    error handling options

173–74

    error types

173

GoTo error handling

175–76

Resume Next error handling

175

    selecting an error handling method

176

    using the Err Object

176–77

Events

189–93

    defined

189

Project Events

189–90

Task Events

190–93

Excel

See VBA Automation

F

 

Fields

See Custom Fields

File bloating

See Project files

File Corruption

See Project files

Files

See Project files

Filters

See Objects - Creating Views, Tables, and Filters

For Each Next Loop

See Loops - For Each Next Loop

For Next Loop

See Loops - For Next Loop

Format text strings

See Data Types - Text data

Formulas

See Custom Fields - using Formulas

Functions

18, 31

    defined

18

    differences with Procedures

31

G

 

Global.mpt file

234–40

    defined

234

    moving macros into

234–39

GoSub Subroutines

18

    defined

18

Graphical Indicators

See Custom Fields - using Graphical Indicators

 

 

H

 

Help

33

Hyperlinks

199–206, 350–51

    used in the Project Control Center macro

199–206

    working with using VBA

350–51

I

 

IF statement

56–58

Immediate Window

See Visual Basic Editor

Importing data

369–82

    from a SQL Server database

379–82

    from an Access database

376–79

    from Excel

369–75

InputBox function

30–31

InStr function

See Data Types - Text data

IntelliSense

See  Entering and Editing Code

L

 

Left function

See Data Types - Text data

Linked Tasks macro

331–41

    designing the code

331–33

    understanding the TaskDependency Object

333–34

    understanding the VBA code

334–41

Locals Window

See Visual Basic Editor

Loops

58–60, 159–61, 389–90, 418–19, 421–27

Do Loop

58–60

For Each Next Loop

60

For Next Loop

60

    looping through all projects in a database

389–90

    looping through all projects in the Project Server DB

418–19, 421–27

    looping through all tasks in a project

159–61

Selected Tasks

160

    using a field to control looping

160–61

 

 

M

 

Master Project

See Consolidated Project Report macro

Menus

See Objects - creating a new Menu

Methods

24–26

Microsoft Excel

See VBA Automation

Microsoft Project 2007

See Project 2007 new features

Microsoft Project Server 2007

See Project Server 2007 new features

Mid function

See Data Types - Text data

Modules

17

    defined

17

MPP files

See Project files

MsgBox function

29

O

 

Object Browser

See Object Model - using the Object Browser

Object Browser Window

See Visual Basic Editor

Object Model

129–42

Application Methods

130–33

Application Objects

130–33

Application Properties

130–33

Assignment Methods

138

Assignment Objects

138

Assignment Properties

138

    getting Help on

129

    overview

129

Project Methods

134

Project Objects

133–34

Project Properties

134–35

Resource Methods

137–38

Resource Objects

137–38

Resource Properties

137–38

Task Methods

135–36

Task Objects

135–36

Task Properties

135–36

Using the Object Browser

138–42

Objects

24–26, 165–69

    creating a new Menu

167–69

    creating a new Toolbar

166

    creating Views, Tables, and Filters

165

    understanding

24–26

OLE DB drivers

405–13

    availability in Project 2007

406

    availability in Project versions

405

    connecting to an .mpp file from another application

406–13

    features in each Project version

405–6

    locating the pjoledb.htm file

405

OLEDB defined

405

    understanding

405

Outline Codes

See Custom Outline Codes

P

 

Parameters

24–26

    named

25

PJDB.HTM

See Databases - using the pjdb.htm file

PJSVRDB.HTM

See Project Server database

Procedures

31, 233

    calling from another file

233

    differences with Functions

31

Project 2007 new features

439–45

    applying cell background formatting

444–45

    controlling Visual Reports

443

    managing Calendars

443–44

    managing custom fields

442

    undoing macro actions

440–42

    using named parameters

440

Project Control Center macro

198–206, 252–58

    deliverables explained

199–200

    designing

198–99

    overview

198

    understanding the code

200–206

    using timephased data

252–58

Project Explorer Window

See Visual Basic Editor

Project files

155–56

    controlling .mpp file size

155

Project Object Model

See Object Model

Project Server 2007

See Project Server 2007 new features

Project Server 2007 new features

445–49

    converting SQL Views from Project Server 2003

445–49

    managing Deliverables

445

Project Server database

417–35

    developing a Weekly Report macro in Excel VBA

418–35

    launch Project and log into Project Server

419–20

    reading Risks and Issues

427–31

    understanding the pjsvrdb.htm file

417

Properties

24–26

Properties Window

See Visual Basic Editor

Q

 

Quickwatch dialog

See Code - debugging

R

 

References

See VBA Automation

Registry

42–43

DeleteSetting

43

GetSetting

43

SaveSetting

43

Right function

See Data Types - Text data

S

 

S-Curves macro

See VBA Automation

Security

See VBA Security

Set Non-Working Days in the Standard Calendar macro

303

Splitting text strings

See Data Types - Text data

Sub Procedures

17

    defined

17

Subprojects

352

T

 

Tables

See Objects - Creating Views, Tables, and Filters

TaskDependency Object

See Linked Tasks macro

Tasks

345–49

    indenting tasks

345–48

    reorganizing task sequence

348–49

Timephased data

243–58

    exporting to a .csv file

246–48

    overview

243

    reading

244–46

    used with the Project Control Center

252–58

    writing

250–51

Toolbars

See Objects - creating a new Toolbar

Toolbox

See Visual Basic Editor

U

 

Update Calendars macro

305–26

    calendars overview

305

    designing Iteration 1

326

    designing Iteration 2

319–21

    designing Iteration 3

323–24

    designing Iteration 4

326

UserForm Window

See Visual Basic Editor

UserForms

19, 181, 182, 184–85

    adding code

184–85

    creating

182

    defined

19

    overview

181

    use in the Driving Tasks macro

222–26

V

 

Value List

See Custom Fields - using a Value List

Variables

37–39, 41, 42

    controlling variable Scope

41–42

Declaring

37

    forcing Declared variables

41

    naming convention

38–39

Private

38

    protecting variables

42

Public

38

    sharing with another file

42

Static

38

VBA

3

    defined

3

Project VBA defined

95

    skills needed to write code

4

    support for VBA macros

5

VBA Automation

73–75, 263–84

    add references to other applications

73–75

    connecting to Excel

267–68

    controlling Project from Excel

271–72

    creating the S-Curves macro

272–76

    creating the Who Does What When macro

278–84

    defined

73, 263

    early binding defined

263

    exporting to Excel

268–70

    late binding defined

263

    opening an Excel template

270–71

    running existing Excel code

270–71

    using early binding

265–67

    using Excel for project reporting

263

    using late binding

264–65

VBA Security

75–79

    create a Digital Certificate

76–79

Views

See Objects - Creating Views, Tables, and Filters

Visual Basic Editor

9, 12

Code Window

9

Immediate Window

9

Locals Window

9

Object Browser Window

9

Project Explorer Window

9, 12

Properties Window

9, 12

Toolbox

9

UserForm Window

9

Watch Window

9

Visual Reports

See Project 2007 new features

W

 

Watch Window

See Visual Basic Editor

Who Does What When macro

See VBA Automation

Windows API

356–60

    using

356–60

    using File Open

357–59

    using File Save As

359

    using Get Folder

360

    using with a Class Module

360

With statement

27

Home