|
-
Dec 4th, 2001, 10:03 PM
#1
Thread Starter
Junior Member
i am not sure what is wrong
This s my code. it is exercise 2 chapter 6 in the micrsoft vb book version 5 and 6 by the Lawrenceville Press
i need the number of times this is run put into a label, but everytime i run i highlightsthe counter = counter +1 please help thank you
Private Sub cmdcalculate_Click()
Dim initial As Double
Dim interest As Double
Dim value As Double
Dim year As Double
Dim counter As Integer
initial = txtinitial.Text
interest = txtinterest.Text
value = txtendvalue.Text
counter = 0
Do While value > year
year = (initial * (interest / 100)) + initial
counter = counter + 1
Loop
lbloutput.Caption = counter
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|