PC Review


Reply
Thread Tools Rate Thread

Compile error: Variable not defined

 
 
Hennie Neuhoff
Guest
Posts: n/a
 
      10th Nov 2008

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
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      10th Nov 2008
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
 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      10th Nov 2008
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile error, Variable not defined RJR Microsoft Excel Programming 4 23rd Mar 2007 02:21 AM
Compile Error: Variable not defined =?Utf-8?B?VGFuZHk=?= Microsoft Access Forms 1 26th Jul 2005 06:15 PM
Variable not defined compile error =?Utf-8?B?UGhpbCBIYWdlbWFu?= Microsoft Excel Programming 4 17th Jun 2005 01:52 PM
Compile error, variable not defined davegb Microsoft Excel Programming 5 19th May 2005 04:41 PM
Compile error: Variable not defined =?Utf-8?B?UGF1bA==?= Microsoft Access VBA Modules 2 8th Mar 2004 11:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:58 PM.