J
JJ
Using Project 2010..
I have some VBA code that uses GetObject and I am passing the full path name of the file to the function which is stored in a Text box on a form. For example...
Assume the Text box is named "txtFile" on a form that contains the full file name
Public Sub Test
Dim prjTest as Project
Set prjTest = GetObject(me.txtFile.Value)
prjTest.Activate
...
End Test
When the code gets to the line with the "GetObject" function, I get "Error 70: Permission Denied." However, if the actual Project file represented in the text box is open, I do NOT get the error.
How do I access the file without physically opening the file?
Do I need to enter the class name as the second argument of GetObject? If so, what IS the class name for an MS Project 2010 file?
Thanks in advance!
I have some VBA code that uses GetObject and I am passing the full path name of the file to the function which is stored in a Text box on a form. For example...
Assume the Text box is named "txtFile" on a form that contains the full file name
Public Sub Test
Dim prjTest as Project
Set prjTest = GetObject(me.txtFile.Value)
prjTest.Activate
...
End Test
When the code gets to the line with the "GetObject" function, I get "Error 70: Permission Denied." However, if the actual Project file represented in the text box is open, I do NOT get the error.
How do I access the file without physically opening the file?
Do I need to enter the class name as the second argument of GetObject? If so, what IS the class name for an MS Project 2010 file?
Thanks in advance!