this is my First question.
I'm trying to declare a global variable in MS Project like I do in Excel. It doesn't work? Can someone explain why it does not work that way. Even better why my solution is working?
My way to declare a Global Variable (Only works for the current userform or module)
This is in ProjectGlobal(global.mpt)
'ThisGlobal(global.mpt)
Public ATP As Project
This is in VBAProject(FileName.mpt)
'my Userform where I use PTP
Public PTP As New Project
For me it makes no sense, that this works. Testet it in Excel, doesnt work.
Edit: Only declare the variable in a Module!