Das sind doch Grundlagen des VB Programmierens. Hier ist ein Beispiel:
Dim colDocs As Documents ' some sample collection
Dim docActive As Document ' some document
On Error Resume Next ' Turn off the error message
Set docActive = colDocs.Item( "C:\Toycar.CATPart" )
If docActive Is Null Then
MsgBox "Dieser Partdatei ist nicht vorhanden"
End If
' Alternativ zu den letzten 3 Zeilen:
If Err.Number <> 0 Then ' there is some error occured
MsgBox "Fehler No. " & CStr( Err.Number )
End If
Hoffentlich hilft's...
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP