Question: I am trying to have an range error message that says please enter values from 0-30 . Right now the code shows the error

I am trying to have an range error message that says " please enter values from 0-30" . Right now the code shows the error message but still adds the value of the application even if the value is greater or less than 30 . Where should the line of statement be in code so it just shows that error message? Or how can I change my code so that it shows that message?  I am trying to have an range error message that says

Humber of floors Click Const intFLOORS As Integer Total number of rooms on all floors const int-TOTAL-ROOS As Integer t ntFLOORS . ntROOS Hold the overall occupancy rate for all rooms and floors Dim dbloveralloccupancyRate As Double -.e . Din dbl TextOccupied AsDouble - Private Sub btnExit click(sender As object, e As EventArgs) Handles btnExit.click close the application He.CloseO End Sub Private Sub btnsave_Click(sender As object, e As EventArgs) Handles btnSave.Click declare the variables of integers and double types Dim intRoomsOccupied As Integer Dim dbloccupancyRate As Double If Integer.TryParse(txtoccupied. Text, intRoomsoccupied) Then If val(txtoccupiedText> 39 Then MessageBox.Show"Please enter values from e-38) intTotalRoomsoccupiedint Roomsoccupied dblOccupancyRate intRoomsOccupied intROOMS displat the results in the listboc istoccupancyRate. Items. Add("Floor:" & cboFloor. Text & "Rooms Occupied :" & tRoonsoccupied. ToString &-occupancy Rat calculate the overall occupancy rate for all the floors dbloverall0ccupancyRate intTotalRoomsoccupied int TOTAL ROOPS display the results to the user txtTotalRooms.Textint TotalRoomsoccupied. ToString) txtoccupancyRate.Text dbloveralloccupancyRate.Tostring"p) If cboFloor.SelectedIndex

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!