Item

<< Click to Display Table of Contents >>

 

Item

Item(ItemId)

Returns a reference to the child object ItemId of the object that called this method. This method can search for an object either by its name or by its index, an integer starting at 1 (one) and less or equal to the value specified in the Count property. If the specified index or name is a valid one, this method returns a reference to the object. Otherwise this method returns an "Invalid Parameter" error. Example:

Sub Screen1_Click()
  ' Assigns to obj the reference to the child object Button1
  ' of Screen1.
  Set obj = Item("Button1")
  ' Set the obj's BackColor property, that is,
  ' Button1.
  obj.BackColor = RGB(255, 0, 0)
End Sub

Was this page useful?