
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