Invalid Message

S

SonT

Hello,

I have used the macro below to import data from one schedule to another
without any
problem. However, whenever I try to import the data into a published
schedule,
I always get an invalid message. It only occurred whenever I tried to
update the following fields: Start, Finish, Actual Start, and Actual Finish.
Please let me know what the problems may be and how I may resolved it.

Sub CorrectItx()
Dim a As Project
Dim b As Project

Dim t As Task
Dim x As Task

Set a = Application.ActiveProject
FileOpen ("C:\Documents\test1.mpp")
Set b = Application.ActiveProject

For Each t In a.Tasks
If Not t Is Nothing Then
For Each x In b.Tasks
If Not t Is Nothing Then
If (t.UniqueID = x.UniqueID) Then x.Start = t.Start

End If

Next x
End If
Next t
End Sub

Thank you in advance.
 
D

Dale Howard [MVP]

SonT --

I would recommend you post this question in the
microosft.public.project.developer newsgroup, as you are more likely to get
a reply in that group. Hope this helps.
 

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