ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Change colour of cells when content is altered/changed (https://www.excelbanter.com/excel-discussion-misc-queries/121781-change-colour-cells-when-content-altered-changed.html)

Martin ©¿©¬ [email protected]

Change colour of cells when content is altered/changed
 
Hi
I have a number of worksheets where the cell colour used to change to
Blue when an entry was made or edited
But it ain't doing it any more
--------------------------------------
This is the code

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub
-------------------------------------------------
I didn't write the code, more likely someone created it for me
Would anyone know why the above code has stopped working
and how to fix it please ?
--
Martin
©¿©¬

CLR

Change colour of cells when content is altered/changed
 
The code appears to work fine, as written, but will only perform on the one
sheet where it's installed.......if you want it to work on other sheets, it
must be copied to their code sections as well..........

Vaya con Dios,
Chuck, CABGx3




"Martin ©¿©¬ lid" wrote:

Hi
I have a number of worksheets where the cell colour used to change to
Blue when an entry was made or edited
But it ain't doing it any more
--------------------------------------
This is the code

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub
-------------------------------------------------
I didn't write the code, more likely someone created it for me
Would anyone know why the above code has stopped working
and how to fix it please ?
--
Martin
©¿©¬


Martin ©¿©¬ [email protected]

Change colour of cells when content is altered/changed
 
I'm getting messages that the macros are disabled
How do I enable them?
--
Martin
©¿©¬

On Thu, 7 Dec 2006 07:12:01 -0800, CLR
wrote:

The code appears to work fine, as written, but will only perform on the one
sheet where it's installed.......if you want it to work on other sheets, it
must be copied to their code sections as well..........

Vaya con Dios,
Chuck, CABGx3




"Martin ©¿©¬ lid" wrote:

Hi
I have a number of worksheets where the cell colour used to change to
Blue when an entry was made or edited
But it ain't doing it any more
--------------------------------------
This is the code

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub
-------------------------------------------------
I didn't write the code, more likely someone created it for me
Would anyone know why the above code has stopped working
and how to fix it please ?
--
Martin
©¿©¬


CLR

Change colour of cells when content is altered/changed
 
Usually, when you first start Excel, a pop-up will ask if you want the macros
enabled or not..........just indicate affirmative.

In Excel97, Tools Options GeneralTab uncheck the box for "Macro Virus
protection"

In other versions it may be under Tools Macros, or Tools Security

hth
Vaya con Dios,
Chuck, CABGx3



"Martin ©¿©¬ lid" wrote:

I'm getting messages that the macros are disabled
How do I enable them?
--
Martin
©¿©¬

On Thu, 7 Dec 2006 07:12:01 -0800, CLR
wrote:

The code appears to work fine, as written, but will only perform on the one
sheet where it's installed.......if you want it to work on other sheets, it
must be copied to their code sections as well..........

Vaya con Dios,
Chuck, CABGx3




"Martin ©¿©¬
lid" wrote:

Hi
I have a number of worksheets where the cell colour used to change to
Blue when an entry was made or edited
But it ain't doing it any more
--------------------------------------
This is the code

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub
-------------------------------------------------
I didn't write the code, more likely someone created it for me
Would anyone know why the above code has stopped working
and how to fix it please ?
--
Martin
©¿©¬



Gord Dibben

Change colour of cells when content is altered/changed
 
The first two lines are doing nothing so you could delete them.

The Worksheet_Change code works for me.

If you want it available for all sheets place it in the Thisworkbook module as

Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub


Gord Dibben MS Excel MVP

On Thu, 07 Dec 2006 13:44:33 GMT, Martin ©¿©¬ lid wrote:

Hi
I have a number of worksheets where the cell colour used to change to
Blue when an entry was made or edited
But it ain't doing it any more
--------------------------------------
This is the code

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub
-------------------------------------------------
I didn't write the code, more likely someone created it for me
Would anyone know why the above code has stopped working
and how to fix it please ?



Martin ©¿©¬ [email protected]

Change colour of cells when content is altered/changed
 
Thanks CLR
I re-enabled the macros and they're working now
Don't understand how they got disabled
Perhaps installing my files to a new pc had something to do with it
--
Regards
Martin
©¿©¬

On Thu, 7 Dec 2006 07:12:01 -0800, CLR
wrote:

The code appears to work fine, as written, but will only perform on the one
sheet where it's installed.......if you want it to work on other sheets, it
must be copied to their code sections as well..........

Vaya con Dios,
Chuck, CABGx3


CLR

Change colour of cells when content is altered/changed
 
Glad you got it working.........thanks for the feedback.

Vaya con Dios,
Chuck, CABGx3



"Martin ©¿©¬ lid" wrote:

Thanks CLR
I re-enabled the macros and they're working now
Don't understand how they got disabled
Perhaps installing my files to a new pc had something to do with it
--
Regards
Martin
©¿©¬

On Thu, 7 Dec 2006 07:12:01 -0800, CLR
wrote:

The code appears to work fine, as written, but will only perform on the one
sheet where it's installed.......if you want it to work on other sheets, it
must be copied to their code sections as well..........

Vaya con Dios,
Chuck, CABGx3



Martin ©¿©¬ [email protected]

Change colour of cells when content is altered/changed
 
On Thu, 07 Dec 2006 09:32:07 -0800, Gord Dibben <gorddibbATshawDOTca
wrote:

The first two lines are doing nothing so you could delete them.

The Worksheet_Change code works for me.

If you want it available for all sheets place it in the Thisworkbook module


Thank you very much Gord, I didn't know that
That's another thing I've learnt today
--
Regards
Martin
©¿©¬

Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)
Target.Interior.ColorIndex = 8
End Sub


Gord Dibben MS Excel MVP


Gord Dibben

Change colour of cells when content is altered/changed
 
Thanks for the feedback.

Learning something new every day has been my goal in life.


Gord

On Fri, 08 Dec 2006 13:07:55 GMT, Martin ©¿©¬ lid wrote:

On Thu, 07 Dec 2006 09:32:07 -0800, Gord Dibben <gorddibbATshawDOTca
wrote:

The first two lines are doing nothing so you could delete them.

The Worksheet_Change code works for me.

If you want it available for all sheets place it in the Thisworkbook module


Thank you very much Gord, I didn't know that
That's another thing I've learnt today


Gord Dibben MS Excel MVP


All times are GMT +1. The time now is 04:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com