Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 1.2 KB

nothing-keyword.md

File metadata and controls

31 lines (19 loc) · 1.2 KB
title keywords f1_keywords ms.assetid ms.date ms.localizationpriority
Nothing keyword (VBA)
vblr6.chm1011405
vblr6.chm1011405
9eedf4db-3aca-df26-8bc7-c3a7f7264e6b
05/04/2019
medium

Nothing keyword

The Nothing keyword is used to disassociate an object variable from an actual object. Use the Set statement to assign Nothing to an object variable. For example:

Set MyObject = Nothing 

Several object variables can refer to the same actual object. When Nothing is assigned to an object variable, that variable no longer refers to an actual object.

When several object variables refer to the same object, memory and system resources associated with the object to which the variables refer are released only after all of them have been set to Nothing, either explicitly by using Set, or implicitly after the last object variable referencing the actual object goes out of scope.

See also

[!includeSupport and feedback]