View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Kieran[_45_] Kieran[_45_] is offline
external usenet poster
 
Posts: 1
Default For...Each Loop Problem

SuperJas try


Sub LoopTest()

Dim DummyCell as Range
Dim MyRegion as Range
Dim Value() as String
Dim i as Integer

i=1

Set MyRegion = Cells(1,1).CurrentRegion.Columns(6)
Redim Value(myregion.cells.count)
For Each DummyCell in MyRegion

Value(i)=DummyCell.Value
i=i+1

Next DummyCell

End Su

--
Message posted from http://www.ExcelForum.com