Check out a Test
Public Function CheckoutTest(tst As Test, comment$, _
    ByRef CanContinue As Boolean) As Object

' Check out a Test

' This example demonstrates the behavior when getting 
' an VCS reference in a project without version control 
' enabled. 
' For production code, you may wish to check once if version 
' control is enabled and not attempt checkouts if it is not.
' See the example,"Check if version control is enabled" under
' Version Control Examples.
    ' The procedure for checking out a Test may change in some 
    ' future version.
    ' This code should work in the future, however we advise
    ' you to revisit this example after the next version
    ' is released.
    ' If the project has version control, this routine
    ' checks out the test and returns the version
    ' control object.
    ' The CanContinue argument is true if the test is
    ' checked out or if the project does not have
    ' version control.
    ' If the project has version control and the checkout
    ' throws an exception, CanContinue is false.
    On Error GoTo checkout_err
    CanContinue = True
    Dim fVersionControl As VCS
    Set fVersionControl = tst.VCS
    If IsNull(fVersionControl) Then
        Set CheckoutTest = Null
        Exit Function
    End If
    Set CheckoutTest = fVersionControl
    fVersionControl.CheckOut -1, comment, False
Exit Function
    CanContinue = False
End Function