LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Code behind worksheets

I am using Excel 97.

I have the following code which I want to put behind each worksheet.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Cells.Interior.ColorIndex = xlColorIndexNone

Range("DaysOutstanding").Interior.ColorIndex = 6
Range("Number").Interior.ColorIndex = 17

Range("A7:A100").Interior.ColorIndex = 35
Range("B7:B100").Interior.ColorIndex = 19
Range("C7:C100").Interior.ColorIndex = 34
Range("D7:D100").Interior.ColorIndex = 35
Range("E7:E100").Interior.ColorIndex = 34

Target.EntireRow.Interior.ColorIndex = 36

End Sub

Is there a routine that I can use to import this in so I don't have to click
on 200 worksheets, please?
--
Mark
 
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
Code for multiple worksheets Paul S Excel Discussion (Misc queries) 1 June 17th 08 12:50 PM
Combine Worksheets - help with Code! CherylH Excel Discussion (Misc queries) 1 September 13th 07 03:45 PM
change worksheets through code MikeD Excel Programming 2 January 31st 05 09:31 AM
Copy worksheets without any code PM Excel Programming 3 December 13th 04 02:38 PM
Need code to protect worksheets - amount of worksheets varies Sandy[_3_] Excel Programming 1 September 9th 03 02:17 AM


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

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

About Us

"It's about Microsoft Excel"