Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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
©¿©¬
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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
©¿©¬

  #4   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default 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
©¿©¬


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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 ?




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default 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

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formate colour of cells in a range of raw Bela Excel Discussion (Misc queries) 3 November 18th 06 08:15 PM
Formate colour of cells Bela Excel Discussion (Misc queries) 4 November 17th 06 09:13 PM
How to change cases from small to capital in all cells? Khoshravan Setting up and Configuration of Excel 3 September 18th 06 09:26 PM
How do I change a number in one cell to change a series of cells? lance559 Excel Discussion (Misc queries) 2 January 13th 06 08:56 PM
Adding colour to a range of cells based on one of the cells v... McKenna Excel Discussion (Misc queries) 4 March 11th 05 02:25 PM


All times are GMT +1. The time now is 02:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"