Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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

  #2   Report Post  
Michael
 
Posts: n/a
Default

Hi Danny
Instead of pasting the Macro in "This Workbook"
put it in "All Open Workbooks"

HTH
Michael Mitchelson


"Danny" wrote:

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

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
Question for Bob Phillips re Splitting Names from Cells Paul Sheppard Excel Discussion (Misc queries) 8 August 3rd 05 09:00 AM
PING Bob Phillips Steve Excel Discussion (Misc queries) 3 July 4th 05 07:31 PM
Bob Phillips followup question on text macro kayabob Excel Discussion (Misc queries) 2 June 27th 05 05:13 PM
Employees across midnight (2200-0100) -repost (attn: Bob) Steve Excel Worksheet Functions 0 March 11th 05 09:35 PM
Bob Phillips, I have one more question JLyons Excel Worksheet Functions 2 February 25th 05 08:39 PM


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