Documents.Open Returns Nothing
Posted: Sun 14. Sep 2014, 16:30
Hi All,
I am controlling PCAN-Explorer from Excel 2010 using VBA. I can instantiate the application and open a project (MyProj.peproj) successfully using the following:
In the snippet above, PCANExp is my instance of PCAN Explorer in VBA.
However, the doc object returned is always Nothing even if the project file was opened correctly. According to the reference documentation, doc should be of type Document if successful. I want to test that doc is not Nothing in order to handle any errors.
<Question>
Does anybody know why doc is Nothing?
Thank you very much.
I am controlling PCAN-Explorer from Excel 2010 using VBA. I can instantiate the application and open a project (MyProj.peproj) successfully using the following:
Code: Select all
Sub OpenProject()
Dim doc
Set doc = PCANExp.Documents.Open("$(MyDocsDir)\PCAN-Explorer 5\MyProj.peproj",,True)
End Sub
However, the doc object returned is always Nothing even if the project file was opened correctly. According to the reference documentation, doc should be of type Document if successful. I want to test that doc is not Nothing in order to handle any errors.
<Question>
Does anybody know why doc is Nothing?
Thank you very much.