I have a problem line in my code, to my reckoning it should tell me I have paid no more door charges.
The code executes but does not give me a print message.
what is wrong with it?
Option Explicit
Private Sub cmdQUIT_Click()
'Terminate Application
End
End Sub
Private Sub cmdStart_Click()
'Declare required storage
Dim Casinos As Integer
Dim Door_Ch As Currency
Dim Money_Res As Currency
Dim Cash As Currency
Dim Money_Spent As Currency
'ask user to input amount of cash taken out
Cash = InputBox("Please input amount taken ", "Cash to Spend")
Door_Ch = 1 * 6
Casinos = Cash - Door_Ch
'Display output in Pic box
picMessage.Print "Door charges paid ", "£"; (Door_Ch)
picMessage.Print "Amount to spend after charges ", "£"; (Cash - Door_Ch)
picMessage.Print "In each casino he spent in casinos ", "£"; (Casinos / 3)
picMessage.Print "The amount he has left is ", "£"; (Cash - 6) Mod 3
If (Cash - 6) Mod 3 >= 2 Then
picMessage.Print "He can visit one more Casino "
If (Cash - 6) Mod 3 = 2 Then
picMessage.Print "He has paid £2 more in door charges "[PROBLEM]
ElseIf (Cash - 6) Mod 3< 2 Then
picMessage.Print "He pays no more door charges "[/PROBLEM]
End If
End If
End Sub
This message was edited by Charlie on 2002-10-28 08:12
The code executes but does not give me a print message.
what is wrong with it?
Option Explicit
Private Sub cmdQUIT_Click()
'Terminate Application
End
End Sub
Private Sub cmdStart_Click()
'Declare required storage
Dim Casinos As Integer
Dim Door_Ch As Currency
Dim Money_Res As Currency
Dim Cash As Currency
Dim Money_Spent As Currency
'ask user to input amount of cash taken out
Cash = InputBox("Please input amount taken ", "Cash to Spend")
Door_Ch = 1 * 6
Casinos = Cash - Door_Ch
'Display output in Pic box
picMessage.Print "Door charges paid ", "£"; (Door_Ch)
picMessage.Print "Amount to spend after charges ", "£"; (Cash - Door_Ch)
picMessage.Print "In each casino he spent in casinos ", "£"; (Casinos / 3)
picMessage.Print "The amount he has left is ", "£"; (Cash - 6) Mod 3
If (Cash - 6) Mod 3 >= 2 Then
picMessage.Print "He can visit one more Casino "
If (Cash - 6) Mod 3 = 2 Then
picMessage.Print "He has paid £2 more in door charges "[PROBLEM]
ElseIf (Cash - 6) Mod 3< 2 Then
picMessage.Print "He pays no more door charges "[/PROBLEM]
End If
End If
End Sub
This message was edited by Charlie on 2002-10-28 08:12