Having a problem in chapter 2
I've built the sample form and module on pages 29-39 and everything worked fine until I clicked the Run button. I received an error box stating as follows:
Run-time error '438':
Object doesn't support this property or method
The box has buttons for End, Debug, and Help
Help - doesn't. Debug, however seems to think there is a problem in the code. The code I've typed in following the example in the book is as follows (cut and pasted exactly from Visual Basic with Debug problem area highlighted by asterisks and all caps):
Private Sub cmdRun_Click()
'declare variables to store price and avail credit
Dim curPrice As Currency
Dim curCreditAvail As Currency
'assign variables to current values in text boxes on Form
curPrice = txtValue1 (***DEBUGGER SAYS THE PROBLEM IS HERE***)
curCreditAvail = txtValue2
'call VerifyCreditAvail procedure
VerifyCreditAvail curPrice, curCreditAvail
End Sub
I have done this exercise on two separate stand-alone computers with the same results each time.
There was a confusing bit on pgs 29-31 with steps 5 and 6, wherein step 5 said to change the Name in the properties for the text boxes to txtValue1 and txtValue2, but step 6 said lblValue1 and lblValue2. I used txt for this since it seemed that that was going to be the variable searched for by the code.
Is there something that I've missed or have other folks had this problem? And what is the solution?
|