Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Question for Bob Phillips re Splitting Names from Cells | Excel Discussion (Misc queries) | |||
PING Bob Phillips | Excel Discussion (Misc queries) | |||
Bob Phillips followup question on text macro | Excel Discussion (Misc queries) | |||
Employees across midnight (2200-0100) -repost (attn: Bob) | Excel Worksheet Functions | |||
Bob Phillips, I have one more question | Excel Worksheet Functions |