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
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