View Single Post
  #1   Report Post  
Danny
 
Posts: n/a
Default ATTN: Mr. Bob Phillips

I got your macro command a long time ago to change the cell pointer. I pasted
it in "ThisWorkbook" on my Personal worksheet. The Macro works when you put
the code in a worksheet. Can you please modify the code so if I copy it in my
Personal worksheet, it will work everytime I open a new workbook?
Thanks a lot.

Public OldRng
Private Sub Workbook_Open()
ReDim OldRng(20) 'allow for up to 20 worksheets
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
Dim ThisRng
On Error Resume Next
Set ThisRng = OldRng
If Not ThisRng Is Nothing Then
ThisRng.Interior.ColorIndex = xlNone
End If
Target.Interior.ColorIndex = 6 'yellow
Set OldRng = Target
End Sub