View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
SuperJas SuperJas is offline
external usenet poster
 
Posts: 66
Default For...Each Loop Problem

Hi

I am trying to loop my code for each cell ("DummyCell") within a defined region ("MyRegion"), which is column F for a current region (please see code below). However, instead of looping through each cell, it just assigns DummyCell to the MyRegion

Here is my code

-------------------------------------
Sub LoopTest(

Dim DummyCell as Range, MyRegion as Rang
Dim Value() as Strin
Dim i as Byt

i=

Set MyRegion = Cells(1,1).CurrentRegion.Columns(6

For Each DummyCell in MyRegio

Redim Preserve Value(i
Value(i)=DummyCell.Value <<< Error Here (since it's trying to set it to the value of MyRegion!
i=i+

Next DummyCel

End Su
-----------------------------------------

Could you please help

Thankyou very much

SuperJas.