Ok it works well, but....its far too slow i need it to be alot faster and i just dont have the know how to make it so, is there some way i can generate the whole grid at once.

The program i am making is running as a model over 50 - 100 - 150 years and updating the colours to show what is present in that grid square at that current time. At the moment it takes 3 minutes to generate the colours in the grid for just 1 year so you can imagine how long it will take for 50 years :S

any tips? the code atm is...

Code:
For X = 1 To Sizer                          ' Populate the Grid
    For Y = 1 To Sizer
    
            If a(X, Y, 1) = 0 Then
            
                MSFlexGrid1.Col = X
                MSFlexGrid1.Row = Y
                
                MSFlexGrid1.CellBackColor = vbYellow
            End If
            
            If a(X, Y, 1) = 1 Then
                
                MSFlexGrid1.Col = X
                MSFlexGrid1.Row = Y
                
                MSFlexGrid1.CellBackColor = vbGreen
            End If
            
            If a(X, Y, 1) = 2 Then
                MSFlexGrid1.Col = X
                MSFlexGrid1.Row = Y
                MSFlexGrid1.CellBackColor = vbRed
            End If
            
    Next Y
Next X
thanks in advance.

Johno

p.s if anyone knows what it is im designing a Spatially Explicit Model.