Hello,
I have a problem with below code.
My form will display Start time and End time for each trip.
However, although I already read travel times file, below coding didn't work.
Supposedly when End time stops at 1600, the data still display a result although it should stop at 1600.
Can someone help me?
Private Sub step1()
lunch = 1
If (Ktotal <= K) And (Ctotal <= C) Then
For i = 0 To row - 1
If Tvisited(i) = 0 Then
s = 0
data(s, 3) = Val(frmDays.txtStart.Text) * 60
data(0, 4) = Val(frmDays.txtEnd.Text) * 60
T = data(s, 3)
lunch = 0
dinner = 0
frmResult.picResult.Print " Itinerary: Day " & Ktotal;
frmResult.picResult.Print poi(s)
Exit For
End If
Next i
If lunch = 1 Then
frmResult.picResult.Print " Total cost: " & Ctotal & ","
frmResult.picResult.Print " Total number of destinations: " & Z & ","
frmResult.picResult.Print " THE TOUR PACKAGE IS COMPLETED"
Else
Call step2
End If
Else
frmResult.picResult.Print "Total cost: " & Ctotal & ","
frmResult.picResult.Print "Total number of destinations: " & Z & ","
frmResult.picResult.Print "THE TOUR PACKAGE IS COMPLETED"
End If
End Sub
I have a problem with below code.
My form will display Start time and End time for each trip.
However, although I already read travel times file, below coding didn't work.
Supposedly when End time stops at 1600, the data still display a result although it should stop at 1600.
Can someone help me?
Private Sub step1()
lunch = 1
If (Ktotal <= K) And (Ctotal <= C) Then
For i = 0 To row - 1
If Tvisited(i) = 0 Then
s = 0
data(s, 3) = Val(frmDays.txtStart.Text) * 60
data(0, 4) = Val(frmDays.txtEnd.Text) * 60
T = data(s, 3)
lunch = 0
dinner = 0
frmResult.picResult.Print " Itinerary: Day " & Ktotal;
frmResult.picResult.Print poi(s)
Exit For
End If
Next i
If lunch = 1 Then
frmResult.picResult.Print " Total cost: " & Ctotal & ","
frmResult.picResult.Print " Total number of destinations: " & Z & ","
frmResult.picResult.Print " THE TOUR PACKAGE IS COMPLETED"
Else
Call step2
End If
Else
frmResult.picResult.Print "Total cost: " & Ctotal & ","
frmResult.picResult.Print "Total number of destinations: " & Z & ","
frmResult.picResult.Print "THE TOUR PACKAGE IS COMPLETED"
End If
End Sub