Skip to content

Latest commit

 

History

History
47 lines (28 loc) · 1.26 KB

Excel.Application.UserControl.md

File metadata and controls

47 lines (28 loc) · 1.26 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Application.UserControl property (Excel)
vbaxl10.chm133224
vbaxl10.chm133224
Excel.Application.UserControl
fd55727d-8f79-14bf-038b-a31a56829a55
04/05/2019
medium

Application.UserControl property (Excel)

True if the application is visible or if it was created or started by the user. False if you created or started the application programmatically by using the CreateObject or GetObject functions, and the application is hidden. Read/write Boolean.

Syntax

expression.UserControl

expression A variable that represents an Application object.

Remarks

When the UserControl property is False for an object, that object is released when the last programmatic reference to the object is released. If this property is False, Microsoft Excel quits when the last object in the session is released.

Example

This example displays the status of the UserControl property.

If Application.UserControl Then 
 MsgBox "This workbook was created by the user" 
Else 
 MsgBox "This workbook was created programmatically" 
End If 

[!includeSupport and feedback]