Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
J-Camper
in reply to: J-Camper

Okay I got the check right,

' Get the Active part document.
Dim ThisDoc As Inventor.Document
Set ThisDoc = invApp.ActiveDocument

If ThisDoc.DocumentType = DocumentTypeEnum.kDrawingDocumentObject Then 'Check if user is in a drawing document
    GoTo 100
Else
    o = MsgBox("I would recommend only using the AUTOSAVE macro in drawing documents. Would you like to ignore this warning?", "Caution", MessageBoxButtons.YesNo)
        
    If o = vbYes Then
        MsgBox "Good Luck..."
        GoTo 100
    Else
        MsgBox "Good Choice!"
        GoTo 102
    End If
End If

but I think I need to "Dim" and "Set" my MsgBox.

 

Not sure what to Dim o as though