1. You can't add rates, it just doesn't work
2. When you display percentages, multiply by 100
3. You are processing and THEN checking for user errors and doing nothing about it.
Instead force them to get it right before going on.
4. Don't assume the user entered correct data
5. Keeping track of the occupancy per floor makes more sense than the rate
How about this? (Used notepad so it may be a bit weird.):
'This calculates and displays each floors occupancy rate.
Dim Occupancy(7) As Byte 'Why do you have an array that is going to be dropped
Dim TotOccupancy As Byte = 0 '240 is < 255 - can't overflow
Dim decOccupancyRate As Decimal
Dim strUserInput As String
Dim decOccupancy As Decimal
Dim intCount As Byte
Dim RoomCount As Integer 'User can say 2 billion and shouldn't overflow
'ListBox1.Items.Add
For intCount As Integer = 0 To 7
RoomCount = 0
while RoomCount < 1 or RoomCount > 30
strUserInput = InputBox("Enter the number of rooms occupied. Provide a value")
if isnumeric(strUserInput) then RoomCount = strUserInput
if RoomCount < 1 or RoomCount > 30 then
MessageBox.Show("Please enter a number greater than 0 and less than 30")
End If
end while
Occupancy(intCount) = RoomCount
TotOccupancy += RoomCount
decOccupancyRate = CDec(RoomCount) / 30.
ListBox1.Items.Add(decOccupancyRate*100)
Next
strUserInput = "Total occupancy= " & TotOccupancy.ToString()
ListBox1.Items.Add(strUserInput)
decOccupancyRate = CDec(TotOccupancy) / 240.
ListBox1.Items.Add(decOccupancyRate * 100)