Is it possible to reorder tasks via VBA macro (in Project 2007)?

R

Richard Hewens

I need to be able to re-order tasks via VBA code (to place summary and
subordinate tasks together). I have not been able to find any VBA
methods to accomplish this. I need to do the equivalent of a "drag and
drop" re-order. Using "cut and paste" loses the UniqueID for the moved
task.

When the macro recorder is turned on, the task re-ordering capability is
disabled.

I'm using Project 2007 Pro. The macro is importing task information
from another application which offers the equivalent of MSP summary
activities.

Can anyone explain how to re-order tasks via VBA? Thanks in advance.
 
R

Rod Gill

To do this without losing the Unique ID, insert a number field such as
Number1. Use VBA (or do it manually) to enter a sequence of new IDs for your
Tasks. Then after making sure all IDs are sequential and unique, sort on
Number1 with the renumber option selected (save the file before doing this!)

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top