thinh
Dec 31st, 1999, 10:18 AM
Hi, look at the code below...Sub cmdGet()
N = 0
Dim ret As Long
Dim Temp As String * 100
Do Until ret <= 1
N = N + 1
ret = GetPrivateProfileString(AppName, "n" & N, vbNull, Temp, Len(Temp), FlName)
If ret <= 1 Then
GoTo nextn
Else
Sleeping.List1.AddItem Trim(Temp)
End If
nextn:
Loop
End Sub
then the sub doesn't work. and when i replace the Do with the For statement it works. can anybody show me what's wrong...
N = 0
Dim ret As Long
Dim Temp As String * 100
Do Until ret <= 1
N = N + 1
ret = GetPrivateProfileString(AppName, "n" & N, vbNull, Temp, Len(Temp), FlName)
If ret <= 1 Then
GoTo nextn
Else
Sleeping.List1.AddItem Trim(Temp)
End If
nextn:
Loop
End Sub
then the sub doesn't work. and when i replace the Do with the For statement it works. can anybody show me what's wrong...