emcee
Aug 19th, 2001, 08:13 AM
When I try to run this code vb keeps highlighting the line commented with "this on" and saying it is a loop without a do, yet there is clearly a do, what's the problem?.
Private Sub Command1_Click()
Dim fred As Long
Dim bob As Long
Dim dan As Long
Dim jack As Long
Dim abe As Long
Dim larry As String
abe = 0
bob = 0
Do
dan = Len(Text4.Text) - bob
jack = Text2.Text ^ bob
fred = Mid(Text4.Text, dan, 1) * jack
abe = abe + fred
bob = bob + 1
Loop Until bob = Len(Text4.Text)
fred = abe
bob = 0
dan = 0
jack = 0
Do
al = fred
Do
dan = (Text1.Text - 1) * (Text1.Text ^ bob)
If fred > dan Then
larry = 0 + larry
Else
If fred < dan Then
jack = Round((dan / fred), 0)
larry = jack + larry
fred = dan Mod fred
End If
bob = bob + 1
Loop Until fred <> al 'This one
bob = 0
Loop Until fred = 0
End Sub
Private Sub Command1_Click()
Dim fred As Long
Dim bob As Long
Dim dan As Long
Dim jack As Long
Dim abe As Long
Dim larry As String
abe = 0
bob = 0
Do
dan = Len(Text4.Text) - bob
jack = Text2.Text ^ bob
fred = Mid(Text4.Text, dan, 1) * jack
abe = abe + fred
bob = bob + 1
Loop Until bob = Len(Text4.Text)
fred = abe
bob = 0
dan = 0
jack = 0
Do
al = fred
Do
dan = (Text1.Text - 1) * (Text1.Text ^ bob)
If fred > dan Then
larry = 0 + larry
Else
If fred < dan Then
jack = Round((dan / fred), 0)
larry = jack + larry
fred = dan Mod fred
End If
bob = bob + 1
Loop Until fred <> al 'This one
bob = 0
Loop Until fred = 0
End Sub