如果指定工作簿正在适当位置上进行编辑,则该值为 True。如果该工作簿已在 Microsoft Excel 中打开,并准备进行编辑,则该值为 False。Boolean 类型,只读。
本示例表示工作簿是在适当位置上打开并正在编辑还是仅在 Microsoft Excel 中打开。
Private Sub Workbook_Open()
If ThisWorkbook.IsInPlace = True Then
MsgBox "Editing in place"
Else
MsgBox "Editing in Microsoft Excel"
End If
End Sub