Works in 2002 but not in 2000 - obect stuff

M

Mark Durrenberger

In my MS Project Add-in

I have a class defined called clsMarksEventClass
the first line of the class is
Public WithEvents myApp As MSProject.Application
' the class implements the MS Project "onchange" event

In my regular module I delcare:
Public MarksEvents As New clsMarksEventClass

Later on I've got this line of code - this activates the on-change class

Set MarksEvents.myApp = MSProject.Application

This line works fine in Project 2002 but dies on project 2000 with the
runtime error message:
Invalid procedure call or argument.

The debugger says MarksEvents.myApp = Nothing and
MSProject.Application = 'Microsoft Project'

Any ideas?

Thanks,
Mark

--
_________________________________________________________
Mark Durrenberger, PMP
Principal, Oak Associates, Inc, www.oakinc.com
"Advancing the Theory and Practice of Project Management"
________________________________________________________

The nicest thing about NOT planning is that failure
comes as a complete surprise and is not preceded by
a period of worry and depression.

- Sir John Harvey-Jones
 
R

Rod Gill

Project 2000 supported far fewer events and I don't think it supported
events classes either. 2000 basically only supported project level events I
think, but I don't have a copy available to confirm that.
 
M

Mark Durrenberger

Thanks Rod - I suspected as much.

Mark

--
_________________________________________________________
Mark Durrenberger, PMP
Principal, Oak Associates, Inc, www.oakinc.com
"Advancing the Theory and Practice of Project Management"
________________________________________________________

The nicest thing about NOT planning is that failure
comes as a complete surprise and is not preceded by
a period of worry and depression.

- Sir John Harvey-Jones
 
J

JackD

For reference (so I can google for it in a couple years after I no longer
have Project 2002 installed) here are the NEW events for Project 2002. Any
event which has a 2 after it existed in Project2000 and was updated for
2002. The previous versions still worked in 2002, but I'm not sure if they
were deprecated for Proj2003.

New eventObjects
ApplicationBeforeClose eventApplication
LoadWebPage eventApplication
ProjectAfterSave eventApplication
ProjectAssignmentNew eventApplication
ProjectBeforeAssignmentChange2 eventApplication
ProjectBeforeAssignmentDelete2 eventApplication
ProjectBeforeAssignmentNew2 eventApplication
ProjectBeforeClearBaseline eventApplication
ProjectBeforeClose2 eventApplication
ProjectBeforePrint2 eventApplication
ProjectBeforeResourceChange2 eventApplication
ProjectBeforeResourceDelete2 eventApplication
ProjectBeforeResourceNew2 eventApplication
ProjectBeforeSave2 eventApplication
ProjectBeforeSaveBaseline eventApplication
ProjectBeforeTaskChange2 eventApplication
ProjectBeforeTaskDelete2 eventApplication
ProjectBeforeTaskNew2 eventApplication
ProjectResourceNew eventApplication
ProjectTaskNew eventApplication
WindowActivate eventApplication
WindowBeforeViewChange eventApplication
WindowDeactivate eventApplication
WindowGoalAreaChange eventApplication
WindowSelectionChange eventApplication
WindowSidepaneDisplayChange eventApplication
WindowSidepaneTaskChange eventApplication
WindowViewChange eventApplication
WorkpaneDisplayChange eventApplication
 

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