Moving Task within a project file

S

SteveA

I have an vba script that needs to resort the order of the tasks. Current
the best solution that I've found is to:

SelectRow <row id>, False
EditCut
SelectRow <new row id + 1>, False
EditPaste

Unfortunately this is a very slow process when doing this a couple hundred
times. Does anyone know of a quicker method for doing this?
 
R

Rod Gill

One way is to use a custom field such as Number1 and enter into it the new
id number you want for every task, then sort by Number1 and select the
automatically renumber option.

By the way, search www.mvps.org/project for the VBA tutorial download. Any
code that continually selects different tasks will be very slow. As in Excel
VBA you don't, and shouldn't, need to ever select a cell to do what you
want, learn and use the object library.
 
S

SteveA

I completely agree.... always use the object library unless all else fails.
That's the reason for the question.... I couldn't figure out how to do this
process via the OM.

Thanks for the suggestion.
 

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