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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top