For Each cell - Variable not defined (VBA)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Shlomit said:
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

Hi Shlomit

Try this:

Dim cell As Variant

For Each cell In myRng.Cells
 
Back
Top