' Connect to the top-level ClearCase object
Dim CC As New ClearCase.Application
Dim CheckedOutFile As CCCheckedOutFile
' Is the file checked out to the current view?
On Error Resume Next
Set CheckedOutFile = CC.CheckedOutFile("m:\carol_main\caroltest\coelem.c")
If Err.Number <> 0 Then
MsgBox "It's not checked out to the current view"
Else
MsgBox "It is checked out to the current view"
' Is the file checked out to a view with a particular tag?
Dim OtherView as CCView
Set OtherView = cc.View("caroly_cal")
If (CheckedOutFile.ByView.TagName = OtherView.TagName) Then
MsgBox "Views match"
Else
MsgBox "Views don't match"
End If
End If