Compile error: Variable not defined

  • Thread starter Thread starter Hennie Neuhoff
  • Start date Start date
H

Hennie Neuhoff

On running this code I SOMETIMES get the message
Compile error: Variable not defined - and the "xlNone" is highlighted
Set EersteSel = Range("A4")
Set LaasteSel = EersteSel.End(xlDown).Offset(0, 70)
Set DataSelle = Range(EersteSel, LaasteSel)
DataSelle.Select
DataSelle.EntireRow.Interior.ColorIndex = xlNone

I'm puzzeled - why only sometimes and surely "xlNone" should't be defined ??
Any ideas
Tanks in advance

HJN
 
Don't know the answer to the compile error, but you do not need
the line: DataSelle.Select . Unless you just want to
see it highlighted, the code is not needed.
 

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