In my opinion, using an array in this situation is not very beneficial. Instead, I would advise utilizing a collection. To do this, I rewrote your code:
Sub program()
Dim errorz_string As String, i, j
Dim colErrorResults As New Collection, error_field
For i = 1 To 8
If Sheets("temp").Cells(i, 2).Interior.Color <> RGB(0, 200, 0) Then
Sheets("temp").Cells(i, 3) = "Not verified"
Sheets("temp").Cells(i, 3).Interior.Color = RGB(200, 0, 0)
colErrorResults.Add Sheets("temp").Cells(i, 1)
End If
Next i
If colErrorResults.Count = 0 Then
Sheets("main").Cells(1, 1) = "Yes all 8 in temp verified."
End If
If colErrorResults.Count <> 0 Then
For Each error_field In colErrorResults
errorz_string = errorz_string & "'" & error_field & "', "
Next error_field
'remove final ',
errorz_string = Left(errorz_string, Len(errorz_string) - 2)
Sheets("main").Cells(1, 1) = "No, missing " & errorz_string & " in temp"
End If
End Sub
and another Version where I did some refactoring to use naming of sheets and the guard pattern:
'if you have custom colors, you can use 'Debug.Print RGB(200, 0, 0)' to find out what the numeric value is.
Private Const GREEN = 51200
Private Const RED = 200
Sub program2()
Dim errorz_string As String, i
Dim colErrorResults As New Collection, error_field
For i = 1 To 8
'select the sheet in the project overview, press F4 and give it a name so you don't have to reference it by its display name. That way the display name can be renamed and your code still works
With wsTempSheet
'Fewer nestings are easier to read. Although "goto" is frowned upon, it allows you to use the guard pattern
If .Cells(i, 2).Interior.Color = GREEN Then GoTo nextLine
.Cells(i, 3) = "Not verified"
.Cells(i, 3).Interior.Color = RED
colErrorResults.Add .Cells(i, 1)
End With
nextLine:
Next i
If colErrorResults.Count = 0 Then
wsMain.Cells(1, 1) = "Yes all 8 in temp verified."
'here you can exit the sub so you can remove one if nesting
Exit Sub
End If
For Each error_field In colErrorResults
errorz_string = errorz_string & "'" & error_field & "', "
Next error_field
'remove final ',
errorz_string = Left(errorz_string, Len(errorz_string) - 2)
wsMain.Cells(1, 1) = "No, missing " & errorz_string & " in temp"
End Sub