Workbooks.CheckOut Method (Excel)

Returns a String representing a specified workbook from a server to a local computer for editing.

expression .CheckOut(Filename)

expression A variable that represents a Workbooks object.

Parameters

Filename

Required

String

The name of the file to check out.

This example verifies that a workbook is not checked out by another user and can be checked out. If the workbook can be checked out, it copies the workbook to the local computer for editing.

Sub UseCheckOut(docCheckOut As String) 
 
 ' Determine if workbook can be checked out. 
 If Workbooks.CanCheckOut(docCheckOut) = True Then 
 Workbooks.CheckOut docCheckOut 
 Else 
 MsgBox "Unable to check out this document at this time." 
 End If 
 
End Sub
Show:
© 2015 Microsoft