View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Thulasiram[_2_] Thulasiram[_2_] is offline
external usenet poster
 
Posts: 106
Default For Each cell - Variable not defined (VBA)

Try declaring this before the code:

Dim cell as range
or
Dim myRng as range

On Jan 25, 2:54 am, Shlomit wrote:
Hi,

I wrote code that inclue :
For Each cell In myRng
...
next
I got error "Variable not defined" and I don't find the reason.
(I some cases it's work but I didn't seccess to recognize when).

Please help, thanks
Shlomit