Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have the following VBA code (to Update, Save, CheckIn and Close the file):
Public Sub UpdateSaveCheckinClose() Dim oDoc As Document Set oDoc = ThisApplication.ActiveDocument oDoc.Update oDoc.Save2 (True) Dim oCtrlDef As ControlDefinition Set oCtrlDef = ThisApplication.CommandManager.ControlDefinitions("VaultCheckinTop") oCtrlDef.Execute oDoc.Close End Sub
But Inventor crashes right after oDoc.Close.
However, if I add the following after oDoc.close, I have no problem.
MsgBox ("Document closed")
Why does Inventor crashes without the MsgBox?
And how can I solve this problem?
Thanks in advance,
Dominiek
Solved! Go to Solution.