Hi. Yes, another newbie here. I'm in my third semester of College working for Networking/Programming degree. Of of my current programming classes is VB 6.0. I have already written 3 programs that do various calculations using the Val function.

Although we didn't discuss the PMT function in class, my teacher asked us to write a program that would calculate the total interest of a loan, and total amount owed. The VB version I'm using came with the book we're using and doesn't have a Help file. Therefore, I looked at the PMT function in Excel, assuming it should be similar.

I have worked on this for more hours than I'd care to admit, and I keep getting different errors. I know this will probably end up being an easy fix, but can someone please look at my code and let me know what you think?

Here is my code under the Calculate command button. Could anyway tell me if I’m at least CLOSE? Any help would be appreciated. Thanks in advance. Here’s the code:

Private Sub cmdCalc_Click()
Dim sngRate As Single
Dim sngTerm As Integer
Dim sngAmtloan As Single
Dim sngTotOwed As Single

sngRate = Val(txtRate.Text)
sngTerm = Val(txtTerm.Text)
sngAmtloan = Val(txtAmtloan.Text)
sngTotOwed = Val(lblTotOwed.Caption)

sngTotOwed Pmt=(txtRate.Text / 12, txtTerm.Text * 12, -txtAmtloan.Text)

End Sub