Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Edit Macro to work for other Workbooks

Public OldRng

Private Sub Workbook_Open()
ReDim OldRng(20) 'allow for upto 20 worksheets
End Sub
The macro below changes the pointer color. It was provided
by Mr. Bob Phillips today. I created an add-in file for it
hoping that it would work when I open another WORKBOOK. It
didn't work. Please help. Thanks.

Private Sub Workbook_SheetSelectionChange(ByVal Sh As
Object, ByVal Target
As Range)
Dim ThisRng

On Error Resume Next
Set ThisRng = OldRng(Sh.Index)
If Not ThisRng Is Nothing Then
ThisRng.Interior.ColorIndex = xlNone
End If
Target.Interior.ColorIndex = 6
Set OldRng(Sh.Index) = Target

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Edit Macro to work for other Workbooks

For this to work you need to have your code included in th
SheetSelectionChange event code of each workbook. ...
Or at least a Run statement there pointing to a macro in anothe
workbook. (See Run Method in VBA Help)

--
Message posted from http://www.ExcelForum.com

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
Edit 2 workbooks at same time Pat Hughes Excel Discussion (Misc queries) 3 June 12th 09 09:40 PM
Why does the Edit Find feature in Excel not work? trainer07 Excel Discussion (Misc queries) 1 March 13th 09 06:34 PM
unable to edit any of my workbooks dljdd Excel Worksheet Functions 1 January 24th 06 01:56 AM
Edit-Find doesn' work, don't know the problem. Gary''s Student New Users to Excel 0 September 17th 05 12:27 AM
Macro, Persoanl Work book and CSV workbooks James Agostinho Excel Programming 2 February 13th 04 03:43 AM


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