Hello everyone. I'm have written a class file that without this for loop will cycle through various zones (these are rooms our customers have on site) and we can assign values (such as boolean t/f, etc.).

But I need to add a feature that checks the average temp and temperature setpoints in these refrigerated rooms and then turns things on or off depending on those values (but it needs to be for each individual zone). Once I added the loop, it assigns the values (but then blankets a return over the last known value over all of the zones).

For instance in the code below DR_FanShutdown boolean will be assigned to all of the zones depending on its last known value, instead of assigning that value separately and individually for that one particular zones. Asking if anyone has any ideas that might help me in this situation.

Thanks in advance for anyone's advice.

Code:
For i As Integer = 0 To MyFacility.Count - 1

                Try
                    If MyFacility.List(i).Name = MyEnergyEfficiency.List(0).Items(i).OwnerName Then
                        'If MyFacility.List(i).AvgWTemp < (CInt(MyFacility.List(i).m_SetPoint) + _TempOverride.Value) Then
                        'If (MyFacility.List(i).m_SetPoint.Value + _TempOverride.Value) >= MyFacility.List(i).AvgWTemp Then
                        If MyFacility.List(i).AvgWTemp <= (MyFacility.List(i).m_SetPoint.Value + _TempOverride.Value) Then
                            DR_FanShutdown = True
                            _ostatus.Value = "Fans Shutdown"
                            Fan._FanKill = True
                        Else
                            DR_FanShutdown = False
                            _ostatus.Value = "Temp. Override; Fans On"
                            Fan._FanKill = False
                        End If
                    End If
                Catch ex As Exception

                End Try

            Next