Using OLE with VB and VBA

You can customise Powerproject by writing macros in Visual BasicĀ® (VB) or Visual Basic for Applications (VBA) to automate certain routines that you might need to perform regularly. For example, you could design a dialog to appear when any of your users first starts a new project. The dialog could contain all the fields that have to be filled in to conform to your organisation's internal standards, such as project title, author's name, author's identification number and the project's level of confidentiality.

Powerproject supports read/write OLE which means that you can write programs or macros to read project data and write data to a project. For example, you might store task progress information in a spreadsheet then key the information into Powerproject manually. With OLE automation, you could write a macro to read the progress data from the spreadsheet then write it into your Powerproject project database, updating the progressed tasks in a fraction of the time it would take to update them manually.

Similarly you might store resource cost information in a separate accounts program. Each week your resource costs might change and you might key the changes into Powerproject manually. Instead of keying the changes in manually, you could export the cost information to a .CSV file, then produce a macro to read the data from the file and write it into your Powerproject project database.

If project reports have to be compiled in a particular program to comply with your organisation's standards, instead of generating the reports from within Powerproject, you could write a macro to read all the appropriate information from the project then feed it into the reporting program and format it in your organisation's style.

To extend the functionality of Powerproject you need some experience of Visual Basic or Visual Basic for Applications. Visual Basic for Applications is supplied with Powerproject.

Macros are not available in Powerproject SaaS.

Related Topics:

Creating user-defined fields for your own use