Link to home
Start Free TrialLog in
Avatar of Robert Ehinger
Robert EhingerFlag for United States of America

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
Avatar of R-Byter
R-Byter
Flag of Serbia image

Seems to me that You have a typo

lblVans.Text = Val(txtPeople.Text) \ Mod 10

What do You want to acheive? \ and Mod side by side is not good.
Avatar of Robert Ehinger

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
Avatar of R-Byter
R-Byter
Flag of Serbia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial