Hi, everyone,
I want to show all kinds of colors (256*256*256=16,777,216) in one Excel worksheet. The VBA code as follows:
Dim i, j, k, i1
Sub a()
Sheet1.UsedRange.Clear
i1 = 1
For i = 0 To 255
For j = 0 To 255
For k = 0 To 255
Cells(i1).Interior.Color = RGB(i, j, k)
Cells(i1) = Str(i) & " " & Str(j) & " " & Str(k)
i1 = i1 + 1
Next
Next
Next
End Sub
When I run the sub, here incounter "too many different cells formats".Can Excel extend memory to solve the problem. Thank you very much!!!
I want to show all kinds of colors (256*256*256=16,777,216) in one Excel worksheet. The VBA code as follows:
Dim i, j, k, i1
Sub a()
Sheet1.UsedRange.Clear
i1 = 1
For i = 0 To 255
For j = 0 To 255
For k = 0 To 255
Cells(i1).Interior.Color = RGB(i, j, k)
Cells(i1) = Str(i) & " " & Str(j) & " " & Str(k)
i1 = i1 + 1
Next
Next
Next
End Sub
When I run the sub, here incounter "too many different cells formats".Can Excel extend memory to solve the problem. Thank you very much!!!