Deactivate

<< Click to Display Table of Contents >>

 

Deactivate

Deactivate()

This method deactivates a previously created object, or an object previously activated using the Activate method. Users can deactivate an object when they must perform a previous configuration, such as initializing a property, or when they want to perform tests in which an object cannot be present and active. Example:

Sub CommandButton1_Click()
  Dim obj, newObj
  Set obj = Application.GetObject("Data")
  Set newObj = obj.AddObject("DemoTag", True)
  ' Deactivate the object
  newObj.Deactivate()
End Sub

 

NOTE

Deactivating an object using this method configures the IsObjectActive property of this object to False.

Was this page useful?