Using The Thing Object
Using The Thing Object
Using The Thing Object
Class modules have two events, Initialize and Terminate. In the Object drop down of the class module,
select Class. The Procedure drop down will show the events. Place the following code in the event
procedures:
Option Explicit
Private mth As Thing
The variable mth will hold a reference to a Thing object, which will be created in the form's Load
event. Put the following code in the Form_Load event procedure, and in the Click event procedures for
the four buttons.
Private Sub Form_Load()
Set mth = New Thing
mth.Name = InputBox("Enter a name for the Thing")
End Sub