Project Before Save Event - EPM 2007

H

Hiral

Hi ,

I am Using the 'g_app_ThisApplication_ProjectBeforeSave' event in EPM 2007
VB Macro.

Thi sevent has a peice of code in the start where i check the current view
of the active project as shown below.

if ActiveProject.Views.Parent.CurrentView <> "" Then
End IF

The entire cde works perectly for all the normal saves.

But when i close the project , and in the box which asks me do you want to
save and check in the project , when i say save , this event is fired.

But at this point in time , my pj object returns no values and thus i get a
run time error 1004 : An Unexpected error occured vit the method.

Also this peice of code work erfectly in 2003 in the mentioned condition as
well.

Please note. Before executing ne peice of code , i am checking if pj is
nothing
as shown below..

If Not (pj Is Nothing) Then
If ActiveProject.Views.Parent.CurrentView <> "" Then
End IF
End IF

BUt it goes inside the first if and throw an error on the second if..

Can ne one plz help me..

Thnx in advance
 

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