event before_close

A

Anne

Hi,
I have a project file from which I copy data in an Excel
file. Before the project file will be closed I want to
compare if the the tasks in Project are identical to those
in the Excel file. Somehow I get no communication between
Project and Excel in the event beforeClose(which is no
problem concerning the procedures in the Userform I use
for that purpose). Are there any restrictions in the usage
of beforeClose?
I tried the same code within the Userform and it was OK.

My code is:
Set oXL = New Excel.Application
oXL.Visible = False
oXL.Workbooks.Open ("G:\dummy\Kosten.xls")
Dim n As Integer
oXL.Sheets("Tabelle2").Activate

For n = 1 To AnzahlVorgaenge
If oXL.Range("B1").Offset(n, 0).Value =
ActiveProject.Tasks(n).UniqueID Then
oXL.Range("T1").Offset(n, 0).AddComment ("OK")
Else ....
End If
Next n

Greetings,
Anne
 
M

Mike Glen

Hi Anne,

On the msnews.microsoft.com server, try the microsoft.public.project.vba
newsgroup as you are more likely to get an answer there.

FAQs, companion products and other useful Project information can be seen at
this web address: http://www.mvps.org/project/

Hope this helps - please let us know how you get on:)

Mike Glen
MS Project MVP
 

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