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.
 
Back
Top