Understanding the Visual Basic Language

Understanding Objects, Properties,

Methods, and Events 882

Understanding Data Types 885

Understanding Variables 887

Understanding Procedures 888

Understanding Scope 889

Understanding Decision Structures . . . . 890

Understanding Loop Structures 891

Writing Code That Is Easily Understood . 894

Writing Efficient Code 900

Trapping Errors 902

Before discussing the Microsoft Office Project 2003 object model, the Visual Basic Editor, and other aspects of and tools for creating and editing code-based solutions in Project 2003, you must first understand some of the elements and principles of Visual Basic:

• Objects, properties, methods, and events

• Decision and loop structures

• Procedures

As you develop your Visual Basic skills and move on to writing more advanced code, there are some general principles of software development that make writing code easier, faster, and less prone to error:

• Using naming conventions for procedures and variables

• Writing modularized code

• Writing formatted code

• Writing efficient code

• Trapping errors

Finally, although much of the discussion presented here is necessarily at a relatively high level, given the overall focus of this book, the intent of this chapter is to provide an overview of the Visual Basic concepts you'll need to take full advantage of VBA in Microsoft Project without being forced to look for a separate reference. After you're comfortable with the information presented here, you should find that most of what remains to be learned in Visual Basic is simply an extension of what you already know.

Note Although Visual Basic for Applications is used to collectively describe the programming language and environment included with Microsoft Project, the language itself is Visual Basic. For the remainder of this chapter, Visual Basic is used to refer to the language and its elements.

For more information about these and many other Visual Basic concepts, see the topics under the heading "Visual Basic Conceptual Topics" in the table of contents of the Microsoft Visual Basic Help files.

The Microsoft Developer Network (MSDN) at http://msdn.microsoft.com/ is also an excellent resource for programming guidelines, tips, and examples.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment