LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 39
Default Remoew row highlighting when workbook is closed

Hi,
Found a bit of code on the web (below) to highlight the active row but need
something that will remove the highlight (not the data) when the workbook is
closed so that the next time you open it nothing is highlighted.
At present when you re-open it a row is still highlighted and then when you
select a cell you end up with two rows highlighted!

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

On Error Resume Next
Target.EntireRow.Interior.ColorIndex = 6
OldRng.EntireRow.Interior.ColorIndex = xlColorIndexNone
Set OldRng = Target

End Sub

 
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
GetValue - Closed Workbook? JMay Excel Discussion (Misc queries) 2 November 3rd 08 04:40 PM
closed workbook macro puiuluipui Excel Discussion (Misc queries) 1 July 4th 08 10:13 PM
Linking to a closed workbook Danedel Excel Worksheet Functions 2 February 3rd 06 06:43 PM
Value from a closed workbook Anthony Slater Excel Discussion (Misc queries) 5 May 17th 05 09:49 AM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM


All times are GMT +1. The time now is 07:51 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"