I "DO" have a "DO"

M

Marie Lavoie

Hi, I have a macro that was once working...

It looks like this:

Sub LectureCode()

i = 5 'initialization du compteur
Sheets("Principale").Select

'Lecture du code
Do While Range("A" & i) <> Empty

(... here I have many code lines...)

Loop

But when I run it, it highlights the word Loop and says it has no "Do"

The only things I changed since the time it was working are lines of code
between this Do and Loop and I have not entered a "Loop" in there.

....Help?

Also, what is the difference between Do While ... Loop and While ... Wend

Marie
 
C

Chip Pearson

Marie,

Most likely, the error is that you are missing or have an extra
"End If" or other "End" statement in the code that you omitted.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
M

Marie Lavoie

nope

Chip Pearson said:
Marie,

Most likely, the error is that you are missing or have an extra
"End If" or other "End" statement in the code that you omitted.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
T

Tom Ogilvy

Could be anything that unbalances your structure. Certainly an error on
your part.

See Above

None
 
Top