hi,
Can some bright person point out to me what I am doing wrong in this code.
I am looking to calculate the cost in £pounds and pence, if the charge for a printout is 5p (Pence) per copy for the first 50,and 3p(Pence) per copy for each additional copy.What am I doing wrong here?
Thanx
Charlie
Private Sub cmdCalculate_Click()
'Declare required storage
Dim Copies As Integer
Dim Charge As Currency
'Invite user how many copies
Copies = InputBox("Please input amount of copies required ", "Copies")
If Copies <= 50 Then
Charge = Copies * 5
ElseIf Copies > 50 Then
Charge = Copies * 5 * 3
End If
'Output total cost in message box
picMessage.Print "The total amount owed is " & Charge; "p"
End Sub
Can some bright person point out to me what I am doing wrong in this code.
I am looking to calculate the cost in £pounds and pence, if the charge for a printout is 5p (Pence) per copy for the first 50,and 3p(Pence) per copy for each additional copy.What am I doing wrong here?
Thanx
Charlie
Private Sub cmdCalculate_Click()
'Declare required storage
Dim Copies As Integer
Dim Charge As Currency
'Invite user how many copies
Copies = InputBox("Please input amount of copies required ", "Copies")
If Copies <= 50 Then
Charge = Copies * 5
ElseIf Copies > 50 Then
Charge = Copies * 5 * 3
End If
'Output total cost in message box
picMessage.Print "The total amount owed is " & Charge; "p"
End Sub