UndoCheckout Method Example

This example checks a file in to its prior state (its state before checkout). The file must be part of a source control project.

Note   To run this procedure, you must have a source control project in place with one web window open and a page called Zinfandel.htm contained in the web. Or, substitute a web and file of your choosing.

Private Sub UndoCheckout()
Dim myWeb As Web

Set myWeb = ("C:/My Webs/Rogue Cellars")
myWeb.RootFolder.Files("Zinfandel.htm").UndoCheckout
End Sub