![]() |
Compile error: Variable not defined
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 |
Compile error: Variable not defined
I'm guessing that you may have used x1none (x-one-none), not xlnone
(x-ell-none). Hennie Neuhoff wrote: 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 -- Dave Peterson |
Compile error: Variable not defined
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. "Hennie Neuhoff" wrote: 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 |
All times are GMT +1. The time now is 01:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com