ProjectBeforeTaskChange

S

Sannas

Hello,

I've created a quickie VB app that writes changes to certain MSProject
fields to an Excel file using ProjectBeforeTaskChange. We need this for
occasional real time updating during meetings. The customer wants to be
aware of changes that come from that meeting. We've been handwriting all
changes so far but I figured we could automatically do this via this app.

The app works like a dream except for one thing, it creates an Excel file
for each change. I want one excel file with a list of changes; not one
change in each Excel file. I've tried to test for the creation of the Excel
file but the app resets it by itself each time through.

Can anyone help me alleviate this problem?

Thanks!!!!
 
J

John

Sannas said:
Hello,

I've created a quickie VB app that writes changes to certain MSProject
fields to an Excel file using ProjectBeforeTaskChange. We need this for
occasional real time updating during meetings. The customer wants to be
aware of changes that come from that meeting. We've been handwriting all
changes so far but I figured we could automatically do this via this app.

The app works like a dream except for one thing, it creates an Excel file
for each change. I want one excel file with a list of changes; not one
change in each Excel file. I've tried to test for the creation of the Excel
file but the app resets it by itself each time through.

Can anyone help me alleviate this problem?

Thanks!!!!

Sannas,
I use the following to first check if Excel is open. If not, open it. If
it is already open, add a new workbook if desired or simply access the
existing workbook(s).

Set Xl = GetObject(, "Excel.application")
If Err <> 0 Then
On Error GoTo 0
Set Xl = CreateObject("Excel.Application")
If Err <> 0 Then
MsgBox "Excel application is not available on this workstation" _
& Chr(13) & "Install Excel or check network connection",
vbCritical
FilterApply Name:="all tasks"
ViewApply Name:=oldview
Set Xl = Nothing
On Error GoTo 0 'clear error function
Exit Sub
End If
End If

Hope this helps.
John
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