Chapter 30: Understanding the Visual Basic Language


Overview

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

  • Data types

  • Variables

  • Decision and loop structures

  • Procedures

  • Scope

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.

Cross-References  

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.

start sidebar
Installing VBA Help

By default, the Help files for VBA are automatically installed the first time you use them. Follow these steps if you want to install them now:

  1. Insert the Microsoft Project 2003 CD-ROM into your computer's CD or DVD drive.

  2. Click Start, Control Panel and then double-click Add/Remove Programs.

    Note  

    The name of this item might be slightly different for your operating system.

  3. Click Microsoft Project in the list of installed programs and then click Change.

  4. Click Add Or Remove Features and then click Next.

  5. Expand the Office Shared Features item and then expand the Visual Basic for Applications item.

  6. In the Visual Basic Help list, click Run From My Computer.

  7. Click the Update button.

This installs several Help files, including those for the Microsoft Project object model, concepts and language reference specific to VBA in Microsoft Office and related programs, general Visual Basic concepts and language reference, and Microsoft Forms.

end sidebar
 



Microsoft Office Project 2003 Inside Out
Microsoft Office Project 2003 Inside Out
ISBN: 0735619581
EAN: 2147483647
Year: 2003
Pages: 268

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net