i have been working on a project for my younger brother. A simple VB6 and MS Access/SQL server based client-server database. For that i recently started working on VB6 as i previously had only worked on Java and C++. I have been consulting the book "Using Visual Basic 6" by Brian Siler and Jeff Spotts. Problem is embarassing enough in my first programe. When i try to compile it, it shows me an error "Compile error: Method or Data member not found". Program is very basic (Loan calculator) with four text fields, four labels(Principal, Annual Interest Rate, Term Year and Monthly payment) and two command buttons(Calculate Payment & Exit). I am sure that there is nothing wrong with the declaration or the syntax as it is absolutely according to the book still i am getting this error and i cant find anything about this error online or in the book. So i am stuck and need help.Can anyone please take a look into this. I would be much obliged.
Private Sub cmdCalculate_Click() Dim cPrincipal As Currency Dim fIntRate As Single Dim nTerm As Integer Dim cPayment As Currency cPrincipal = Val(txtPrincipal.Text) fIntRate = Val(txtIntRate.Text) / 100 fIntRate = fIntRate / 12 nTerm = Val(txtTerm.Text) * 12 cPayment = cPrincipal * (fIntRate / (1 - (1 + fIntRate) ^ -nTerm)) txtPayment.Text = Format(cPayment, “Fixed”) End Sub Private Sub cmdExit_Click() End End Sub