Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 1.28 KB

Excel.Workbooks.CanCheckOut.md

File metadata and controls

56 lines (35 loc) · 1.28 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Workbooks.CanCheckOut method (Excel)
vbaxl10.chm203086
vbaxl10.chm203086
Excel.Workbooks.CanCheckOut
06259bbd-2e55-3fbe-d08c-094985cb9fff
05/18/2019
medium

Workbooks.CanCheckOut method (Excel)

True if Microsoft Excel can check out a specified workbook from a server. Read/write Boolean.

Syntax

expression.CanCheckOut (FileName)

expression A variable that represents a Workbooks object.

Parameters

Name Required/Optional Data type Description
FileName Required String The name of the file to check out.

Return value

Boolean

Example

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 UseCanCheckOut(docCheckOut As String) 
 
 ' Determine if workbook can be checked out. 
 If Workbooks.CanCheckOut(Filename:=docCheckOut) = True Then 
 Workbooks.CheckOut (Filename:=docCheckOut) 
 Else 
 MsgBox "You are unable to check out this document at this time." 
 End If 
 
End Sub

[!includeSupport and feedback]