• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Understanding Objects > Reading and Setting Properties

Reading and Setting Properties

An object’s properties describe the current state of the object. Any class can have zero or more properties. When you instantiate an object from the class, each of these properties has a value. You can read the current value of each property from VBA code, or assign new values to properties from VBA code. Here’s an example of reading current values of a form object’s properties:

Sub ReadProperties()
  ' Display some properties of an object
  Dim frm As New Form_Projects
  frm.Visible = True
  Debug.Print frm.Caption
  Debug.Print frm.RecordSelectors
End Sub


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint