Hi, I run into a problem when using COFe.xlt.
When I create a new flosheet within Excel using the COFE template there is no problem : the flowsheet is created, and property and flow data can be used. When I however like to open an existing flowsheet, it shows me the following message - in Dutch : Title: "Failed to create flowsheet object"; message : "Eigenschap Add van klasse OleObjects kan niet worden opgehaald" (in English something like "Property Add of class OleObjects cannot be created /collected"?). I'm using Excel 2010/Windows 7. Does someone have any clues regarding this issue? Thanks!
regards,
Henk
Failed to create flowsheet object
Moderator: jasper
Re: Failed to create flowsheet object
...a next messgage screen reads:
Title: "No Flowsheet document"
Message: "COFE Excel documents requiere an excel dcument to be present; the document now will close"
These message are generated while working in Excel.
Henk
Title: "No Flowsheet document"
Message: "COFE Excel documents requiere an excel dcument to be present; the document now will close"
These message are generated while working in Excel.
Henk
Re: Failed to create flowsheet object
I just tried in Office 2010 (Win 8.1) and I cannot get it to fail. So it is hard for me to see what the problem is exactly. The code that calls the Add method (strangely the error message you report appears to indicate that Add is a property, not a method) you can simply see when you hit Alt+F11 to open the VBA editor after creating a document from COFE.xlt.
It is part of the COFE_ReplaceFlowsheetDocument function in the COFEActions module of the macros in the workbook, the specific lines
so it is rather strange that the Else branch works, but the If branch does not work (which is what I understand from your message).
For completeness, the Add method is described here:
http://msdn.microsoft.com/en-us/library ... 14%29.aspx
If you go to the AddIns ribbon in Excel and pick Replace Flowsheet after you created a document with a new flowsheet, does this work? (this calls the same function).
It is part of the COFE_ReplaceFlowsheetDocument function in the COFEActions module of the macros in the workbook, the specific lines
Code: Select all
If (prompt.useFile) Then
Set obj = ws.OLEObjects.Add(, prompt.filebox.Text)
Set obj = Nothing 'prevent configuration dialog
Else
Set obj = ws.OLEObjects.Add("COCO_COFE.Document")
End If
For completeness, the Add method is described here:
http://msdn.microsoft.com/en-us/library ... 14%29.aspx
If you go to the AddIns ribbon in Excel and pick Replace Flowsheet after you created a document with a new flowsheet, does this work? (this calls the same function).
Re: Failed to create flowsheet object
Jasper, thanks for your reply and hints.
I guess it has to do with my setup, as at another system it indeed runs OK. Maybe a lost reference?
I'm going to dig deeper in using your suggestions.
Thanks!
Henk
I guess it has to do with my setup, as at another system it indeed runs OK. Maybe a lost reference?
I'm going to dig deeper in using your suggestions.
Thanks!
Henk