Documents.Open Returns Nothing

Comprehensive CAN monitor for Windows® and its add-ins: Plotter, CANdb Import, Instruments Panel, and J1939
Post Reply
HardyK
Posts: 3
Joined: Sat 13. Sep 2014, 16:42

Documents.Open Returns Nothing

Post by HardyK » 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:

Code: Select all

Sub OpenProject()

   Dim doc

   Set doc = PCANExp.Documents.Open("$(MyDocsDir)\PCAN-Explorer 5\MyProj.peproj",,True)

End Sub
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.

User avatar
PEAK-Support
Sales & Support
Sales & Support
Posts: 1646
Joined: Fri 10. Sep 2010, 19:34

Re: Documents.Open Returns Nothing

Post by PEAK-Support » Mon 15. Sep 2014, 12:09

Please send your request directly to us per e-mail support[at]peak-system.com , including your Serial Number of the PE5.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------

Post Reply