PC Review


Reply
Thread Tools Rate Thread

Clearing the interior color properly?

 
 
Maury Markowitz
Guest
Posts: n/a
 
      13th Jun 2008
I have a function that rolls over a column in a sheet and fills in the
interior color to draw the eye to problems. It's got a lot of entries,
but they basically look like...

src = ast.Range("BV" & i)
Select Case src
Case 1, 2, 3, 11, 18HPL
.Interior.Color = ourPurple
.ClearComments

[ lots more Cases ]

Case Else
.Interior.Color = -1
.ClearComments
end select


The Case Else is there to wipe out any color that may have been put
into that cell on a previous run. But when I set the color to -1, the
border disappears.

1) why does the border disappear when I set the interior?
2) is there some other way to clear out the interior that I should use
instead?

Thanks!

Maury


What I'm really trying to do here is simply remove any color that
might have been there in the past.
 
Reply With Quote
 
 
 
 
Susan
Guest
Posts: n/a
 
      13th Jun 2008
recording a macro & clearing the color i get:

Selection.Interior.ColorIndex = xlNone

try that.
hope it helps

susan


On Jun 13, 10:30*am, Maury Markowitz <maury.markow...@gmail.com>
wrote:
> I have a function that rolls over a column in a sheet and fills in the
> interior color to draw the eye to problems. It's got a lot of entries,
> but they basically look like...
>
> * * * * src = ast.Range("BV" & i)
> * * * * * * Select Case src
> * * * * * * * Case 1, 2, 3, 11, 18HPL
> * * * * * * * * .Interior.Color = ourPurple
> * * * * * * * * .ClearComments
>
> [ lots more Cases ]
>
> * * * * * * * *Case Else
> * * * * * * * * .Interior.Color = -1
> * * * * * * * * .ClearComments
> * * * * *end select
>
> The Case Else is there to wipe out any color that may have been put
> into that cell on a previous run. But when I set the color to -1, the
> border disappears.
>
> 1) why does the border disappear when I set the interior?
> 2) is there some other way to clear out the interior that I should use
> instead?
>
> Thanks!
>
> Maury
>
> What I'm really trying to do here is simply remove any color that
> might have been there in the past.


 
Reply With Quote
 
Maury Markowitz
Guest
Posts: n/a
 
      13th Jun 2008
Thanks!
 
Reply With Quote
 
Maury Markowitz
Guest
Posts: n/a
 
      13th Jun 2008
Whoa, ok that did not work. When I use xlNone, the cells turn cyan!

Any ideas anyone?

Maury
 
Reply With Quote
 
Susan
Guest
Posts: n/a
 
      13th Jun 2008
wow. worked for me in xl2000.
i assume you copied it directly & used ColorIndex instead of just
Color?
i don't have any other ideas, sorry
susan


On Jun 13, 11:06*am, Maury Markowitz <maury.markow...@gmail.com>
wrote:
> Whoa, ok that did not work. When I use xlNone, the cells turn cyan!
>
> Any ideas anyone?
>
> Maury


 
Reply With Quote
 
cush
Guest
Posts: n/a
 
      13th Jun 2008

Do you have any conditional formating that would turn the interior color on?



"Maury Markowitz" wrote:

> Whoa, ok that did not work. When I use xlNone, the cells turn cyan!
>
> Any ideas anyone?
>
> Maury
>

 
Reply With Quote
 
Maury Markowitz
Guest
Posts: n/a
 
      16th Jun 2008
On Jun 13, 11:10*am, Susan <bogenex...@aol.com> wrote:
> wow. *worked for me in xl2000.
> i assume you copied it directly & used ColorIndex instead of just
> Color?


No, of course not, like a noob I simply saw "color" and assumed...

It's working great now, thanks!

Maury
 
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
How to make font color oppose to cell interior color narke Microsoft Excel Discussion 4 31st May 2010 03:11 AM
Set text color to interior color =?Utf-8?B?S0otY2x1ZWxlc3M=?= Microsoft Excel Programming 4 6th Sep 2007 11:34 PM
Cell background color (interior color) setting not working Martin E. Microsoft Excel Programming 1 21st May 2006 07:00 PM
Clearing Interior Colours or all sheets ExcelMonkey Microsoft Excel Programming 4 22nd Mar 2005 10:39 PM
Passing Back Color to Interior Color ExcelMonkey Microsoft Excel Programming 1 22nd Mar 2005 04:27 PM


Features
 

Advertising
 

Newsgroups
 


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