View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stewart Stewart is offline
external usenet poster
 
Posts: 14
Default Arrays and range references in VBA

I want to do something similar to this. Can it be done?
Sub gg()
Dim t(40000) As Range, z as long
z=0
For x = 1 To 40000
If CONDITION THEN
z=z+1
Set t(z) = Range("A1")(x)
end if
Next
t().Interior.ColorIndex = 39
End Sub


Thanks