Excel VBA & Arrays
I can't get the following procedure to work... according to the help files,
it should work but doesn't. I get a "Compile error: Can't assign to array"
when vColumns = Array("A", "B", ...). Does anyone know why and how to fix?
Thanks! :-)
Public Sub Suffy()
Dim vColumns(6) As Variant
Dim i As Integer
vColumns = Array("A", "B", "C", "D", "E", "F", "G")
For i = 1 To 7 Step 1
Debug.Print sColumns(i)
Next i
End Sub
|