I would like some help with my method
Posted on 2005-04-16
I am working out of a "Learn Advanced VB" book and I have copied the code exactly, so I thought, from the text.
However, when I attempt to run it, I receive an error, variable not defined, on my "With mDispensaryItem" inside my cmdSetProperties_Click sub.
While this is not all of the code, it should be enough to hopefully point out my error.
Private mDispensaryItem As New CDispensaryItem 'Instansiate the new object
Private Sub cmdSetProperties_Click()
'Assign form control values to properties of object
If cboFrameSize.ListIndex <> -1 And cboFrameStyle.ListIndex <> -1 Then
.FrameSize = cboFrameSize.ListIndex + 1 'Save size number
.FrameStyle = cboFrameStyle.ListIndex + 1 'Save style number
.Quantity = Val(txtQuantity.Text)
MsgBox "Enter values for object properties.", vbInformation, "Advanced Vision"