Robert Ehinger
asked on
Visual Studio Modulus Operator
I am having a bit of a struggle with the Modulus operator in Visual Studio. Here is the code for a small program I have written that is not running as it should. Please Advise.
Public Class frmMain
Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
Private Sub btnCalculate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
'Calculate and display the number of filled vans and the number of people left without a ride
lblVans.Text = Val(txtPeople.Text) \ Mod 10
End Sub
End Class
Thank you!!
Robert
Public Class frmMain
Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click
Me.Close()
End Sub
Private Sub btnCalculate_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
'Calculate and display the number of filled vans and the number of people left without a ride
lblVans.Text = Val(txtPeople.Text) \ Mod 10
End Sub
End Class
Thank you!!
Robert
ASKER
Trying to have a small application to display how many vans we will need for transporting people to functions and how many will be left needing other transportation. So there needs to be two numeric outputs displayed.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
lblVans.Text = Val(txtPeople.Text) \ Mod 10
What do You want to acheive? \ and Mod side by side is not good.