At a guess, DG1 is a DataGrid of some form, and you are trying to set the background colour for rooms, but boy are there problems with that code ...
Your
For
loop runs from 1 (which isn't the index of the first row - they are numbered from 0 in .NET) to a value that you decrease each time you go round it ...
Instead of playing with the colours, do it when you draw the control - this may help:
Colouring DataGridView Cells According to their Content in WinForms[
^] the code is in C#, but onlone converters exist and can help you you don't understand:
Code Converter C# to VB and VB to C# – Telerik[
^]