Example: Determining if a file is under source control and, if so, whether it is checked out

' Connect to the top-level ClearCase object
Dim CC As New ClearCase.Application
Dim Ver As CCVersion

' How to tell whether a file is under source control (ICCVersion example)
On Error Resume Next
Set Ver = CC.Version("m:\carol_main\caroltest\testelem.c")
If Err.Number <> 0 Then
     MsgBox "It's not under source control: " & Err.Description
Else
     MsgBox "It's under source control, with extended path " & Ver.ExtendedPath

     ' How to tell whether a CCVersion object represents a checked-out file
     MsgBox "Checked out? " & Ver.IsCheckedOut
End If

Feedback