Interpretive VBA vs. Compiled VBA extensions to Project 
Author Message
 Interpretive VBA vs. Compiled VBA extensions to Project

Hi,
I have a number of macros written in VB that are interpreted when called.
They run pretty slow on large MS project files (loop through all tasks and
sum up numbers etc.) I'd like to make them faster...

Should I be turning them into COM files or should I be making exe files and
somehow tucking them into global.mpt????

Thanks,
Mark



Tue, 29 Mar 2005 06:48:37 GMT  
 Interpretive VBA vs. Compiled VBA extensions to Project
First, look at the code to see if you can make it faster.
Then investigate making them into COM add-in.

In either case, optimizing the algorithms you are using will be of benefit,
so why not do that first?

--
Please try to keep replies in this group. I do check e-mail, but only
infrequently.
For Macros and other things check http://masamiki.com/project

-Jack Dahlgren, Project MVP

+++++++++++++++++++

Quote:
> Hi,
> I have a number of macros written in VB that are interpreted when called.
> They run pretty slow on large MS project files (loop through all tasks and
> sum up numbers etc.) I'd like to make them faster...

> Should I be turning them into COM files or should I be making exe files
and
> somehow tucking them into global.mpt????

> Thanks,
> Mark



Wed, 30 Mar 2005 03:56:53 GMT  
 Interpretive VBA vs. Compiled VBA extensions to Project
Hi,

You say you sum up numbers? If so and you have Project 2000+ then use
formulas in custom fields to do the summing for you. They should be a lot
faster.

If you only need to do actions on some tasks, create a filter that only
displays those tasks then loop through visible tasks only.

Both these techniques can significantly speed your VBA times. Where possible
always get Project to do the work (formulae or filtering).

--

Visit www.mvps.org/project/ for the Project MVP's FAQ and third party
add-ons

Rod Gill
Microsoft Project MVP
Visit www.projectlearning.com for customized Project and Office VBA macros
and Project companion software


Quote:
> Hi,
> I have a number of macros written in VB that are interpreted when called.
> They run pretty slow on large MS project files (loop through all tasks and
> sum up numbers etc.) I'd like to make them faster...

> Should I be turning them into COM files or should I be making exe files
and
> somehow tucking them into global.mpt????

> Thanks,
> Mark



Wed, 30 Mar 2005 04:25:39 GMT  
 Interpretive VBA vs. Compiled VBA extensions to Project
How do you structure something to only go through the visible task?

thanks.


Quote:
> Hi,

> You say you sum up numbers? If so and you have Project 2000+ then use
> formulas in custom fields to do the summing for you. They should be a lot
> faster.

> If you only need to do actions on some tasks, create a filter that only
> displays those tasks then loop through visible tasks only.

> Both these techniques can significantly speed your VBA times. Where
possible
> always get Project to do the work (formulae or filtering).

> --

> Visit www.mvps.org/project/ for the Project MVP's FAQ and third party
> add-ons

> Rod Gill
> Microsoft Project MVP
> Visit www.projectlearning.com for customized Project and Office VBA macros
> and Project companion software



> > Hi,
> > I have a number of macros written in VB that are interpreted when
called.
> > They run pretty slow on large MS project files (loop through all tasks
and
> > sum up numbers etc.) I'd like to make them faster...

> > Should I be turning them into COM files or should I be making exe files
> and
> > somehow tucking them into global.mpt????

> > Thanks,
> > Mark



Sat, 02 Apr 2005 10:51:30 GMT  
 Interpretive VBA vs. Compiled VBA extensions to Project
apply the filter, select all the tasks, then use the ActiveSelection
collection.

example:
for each task in ActiveSelection.Tasks
    task.name = "Hey you can't tell us apart!"
next task

You can see the syntax for filtering and selecting by turning on the macro
recorder, applying a filter then selecting all the visible tasks (click in
the box in the upper left corner).

--
Please try to keep replies in this group. I do check e-mail, but only
infrequently.
For Macros and other things check http://masamiki.com/project

-Jack Dahlgren, Project MVP

+++++++++++++++++++

Quote:
> How do you structure something to only go through the visible task?

> thanks.



> > Hi,

> > You say you sum up numbers? If so and you have Project 2000+ then use
> > formulas in custom fields to do the summing for you. They should be a
lot
> > faster.

> > If you only need to do actions on some tasks, create a filter that only
> > displays those tasks then loop through visible tasks only.

> > Both these techniques can significantly speed your VBA times. Where
> possible
> > always get Project to do the work (formulae or filtering).

> > --

> > Visit www.mvps.org/project/ for the Project MVP's FAQ and third party
> > add-ons

> > Rod Gill
> > Microsoft Project MVP
> > Visit www.projectlearning.com for customized Project and Office VBA
macros
> > and Project companion software



> > > Hi,
> > > I have a number of macros written in VB that are interpreted when
> called.
> > > They run pretty slow on large MS project files (loop through all tasks
> and
> > > sum up numbers etc.) I'd like to make them faster...

> > > Should I be turning them into COM files or should I be making exe
files
> > and
> > > somehow tucking them into global.mpt????

> > > Thanks,
> > > Mark



Sat, 02 Apr 2005 14:28:38 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Interpretive vs Compiled

2. Acc2000 vs Acc2.0 VBA function Compile problem

3. VBA Script vs Compiled VB Application

4. vba access vs vba excel (alguien sabe?)

5. Access97 vba VS Access2000 vba

6. VBA 5 vs VBA 4

7. Excel 97 VBA vs Excel 2000 VBA

8. Proj 98 VBA vs Proj 2000 VBA

9. Word VBA vs Excel VBA

10. VBA 97 vs VBA 2000

11. Word2000 VBA vs. Word97 VBA

12. Newbie confused: VB6 vs VB.Net vs VBScript vs VBA

 

 
Powered by phpBB® Forum Software