VERSION 5.00 Begin VB.Form FrmCritters Caption = "There's critters everywhere!!!" ClientHeight = 3360 ClientLeft = 60 ClientTop = 345 ClientWidth = 7995 LinkTopic = "Form1" ScaleHeight = 3360 ScaleWidth = 7995 StartUpPosition = 3 'Windows Default Begin VB.TextBox txtType Height = 375 Left = 1800 TabIndex = 5 Top = 600 Width = 1455 End Begin VB.TextBox txtName Height = 375 Left = 1800 TabIndex = 4 Top = 120 Width = 1455 End Begin VB.ListBox lstCritters Height = 2400 Left = 3960 TabIndex = 3 Top = 240 Width = 3255 End Begin VB.CommandButton cmdMakeOne Caption = "Make a critter!!" Height = 495 Left = 480 TabIndex = 2 Top = 1440 Width = 2535 End Begin VB.Label Label2 Alignment = 1 'Right Justify Caption = "Type" Height = 375 Left = 240 TabIndex = 1 Top = 720 Width = 1215 End Begin VB.Label Label1 Alignment = 1 'Right Justify Caption = "Name" Height = 375 Left = 240 TabIndex = 0 Top = 120 Width = 1215 End End Attribute VB_Name = "FrmCritters" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim myCritters As Critters Sub showCritters() 'Shows all the critters in the list box Dim tempCritter As Critter lstCritters.Clear For Each tempCritter In myCritters lstCritters.AddItem tempCritter.Name Next End Sub Private Sub cmdMakeOne_Click() Dim theName As String Dim theType As String Dim tempCritter As Critter theName = txtName.Text theType = txtType.Text Set tempCritter = myCritters.Add(theName, theType) showCritters End Sub Private Sub Form_Load() Set myCritters = New Critters End Sub Private Sub lstcritters_Click() Dim tmpCritter As Critter Set tmpCritter = myCritters.Item(lstCritters.ListIndex + 1) tmpCritter.Speak End Sub