
Originally Posted by
Admin
Dim d, r As Long, c As Long, n As Long, Rng As Range
Dim dic As Object, a() As String, x, y, Colors, j As Long
[/code]
Admin... I think you forgot for the moment you were writing VBA code... the d, x, y and Colors variable will all be declared as Variants for the above Dim statements. For those reading this message... in VBA, each variable must be individually declared as to its data type, otherwise it will be declared as a Variant. So, Admin meant to write the above like this...
Code:
Dim d As Long, r As Long, c As Long, n As Long, Rng As Range
Dim dic As Object, a() As String, x As Long, y As Long, Colors As Long, j As Long
Bookmarks