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: 5
Default Edit MACRO for all SHEETS

The macro below changes the cell pointer color. However,
it only works on A sheet in a workbook. I need the macro
to work in ALL the sheets in the workbook without pasting
the macro on all worksheet modules.

Public OldRng As Range

Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
If Not OldRng Is Nothing Then
OldRng.Interior.ColorIndex = xlNone
End If
Target.Interior.ColorIndex = 6
Set OldRng = Target
End Sub

Please edit MACRO to work on all sheets. Thanks




 
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
Record Macro and Edit Macro options disabled Huzza New Users to Excel 1 March 18th 09 03:55 PM
Protect but Allow Edit Ranges in Multiple Sheets EugeniaP Excel Discussion (Misc queries) 6 September 25th 08 05:32 PM
Edit Sheets in Excel Addin Tim879 Excel Discussion (Misc queries) 2 November 28th 07 05:00 PM
I cannot edit work sheets on excel but i can view them. stewart pines Excel Worksheet Functions 5 April 19th 07 11:56 PM
Emailing Sheets Code Edit Todd Huttenstine[_2_] Excel Programming 2 November 17th 03 07:46 PM


All times are GMT +1. The time now is 09:14 AM.

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"