PC Review


Reply
Thread Tools Rate Thread

background colour.

 
 
shiro
Guest
Posts: n/a
 
      21st Jul 2008
I have some cells with background colour.
I want the background colour change automatically
when the value of the cell being updated,but when
printing the the sheet,the background colour is disappear.
How to do that?
The cell position is random.
Thank's id advance.

Rgds,

Shiro.


 
Reply With Quote
 
 
 
 
Stephen Newman
Guest
Posts: n/a
 
      21st Jul 2008
On Mon, 21 Jul 2008 13:44:47 +0800, "shiro" <(E-Mail Removed)> wrote:

From Chip Pearson's site:

Put the following code in 'thisWorkbook'. The selected cell in all
your sheets will then change color, and the cell which was left will
revert back to no color.



Option Explicit

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Excel.Range)
Static OldCell As Range

If Not OldCell Is Nothing Then
OldCell.Interior.ColorIndex = xlColorIndexNone
End If

Target.Interior.ColorIndex = 6

Set OldCell = Target

End Sub


>I have some cells with background colour.
>I want the background colour change automatically
>when the value of the cell being updated,but when
>printing the the sheet,the background colour is disappear.
>How to do that?
>The cell position is random.
>Thank's id advance.
>
>Rgds,
>
>Shiro.
>

 
Reply With Quote
 
shiro
Guest
Posts: n/a
 
      24th Jul 2008
Mr Stephen,
Appreciated your help.I have not visited Mr Chip's page,
just hope I'll get the answer here.

I need more condition,I want turn the OldCell colour to
another colour if the cell's value was updated by user,
if it's not updated the colour is xlColorIndexNone,how to
modify the code?
Thank's in advance.

Rgds,

Shiro


"Stephen Newman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Mon, 21 Jul 2008 13:44:47 +0800, "shiro" <(E-Mail Removed)> wrote:
>
> From Chip Pearson's site:
>
> Put the following code in 'thisWorkbook'. The selected cell in all
> your sheets will then change color, and the cell which was left will
> revert back to no color.
>
>
>
> Option Explicit
>
> Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
> Target As Excel.Range)
> Static OldCell As Range
>
> If Not OldCell Is Nothing Then
> OldCell.Interior.ColorIndex = xlColorIndexNone
> End If
>
> Target.Interior.ColorIndex = 6
>
> Set OldCell = Target
>
> End Sub
>
>
> >I have some cells with background colour.
> >I want the background colour change automatically
> >when the value of the cell being updated,but when
> >printing the the sheet,the background colour is disappear.
> >How to do that?
> >The cell position is random.
> >Thank's id advance.
> >
> >Rgds,
> >
> >Shiro.
> >



 
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
can't put background colour in O.E. Cassie Windows XP Basics 2 7th Jul 2006 03:06 AM
change a cell background colour to my own RGB colour requirements =?Utf-8?B?U3RlcGhlbiBEb3VnaHR5?= Microsoft Excel Misc 4 16th Jun 2006 01:08 PM
Background Colour =?Utf-8?B?UGF1bFc=?= Microsoft Frontpage 1 1st Jun 2006 03:09 PM
Re: Background colour using VB Tom Ogilvy Microsoft Excel Programming 2 15th Sep 2004 08:58 PM
Background colour using VB Microsoft Excel Programming 0 15th Sep 2004 02:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:50 AM.