Interspersed.
> Hi Dave
>
[quoted text clipped - 13 lines]
> [Sheet8 (Code)]" these two Sub's are the only macro's
> shown in that window.
And that window that you see is a module--a worksheet module (if you want).
> They are also shown if I select the workbooks Module1
> along with 15 other macro's used throughout the other
> seven worksheets.
Are the worksheet_beforerightclick & _beforedoubleclick also in Module1 (as an
exact copy)?
If yes, this sounds like someone pasted them (or typed) them in the wrong spot,
then instead of moving them, they copied and never cleaned up those
_beforexxxclick routines in the general module (module1).
> So if a piece of code/macro is to be used only on a
> particular worksheet, should that piece of code be added
> to the workbook through the worksheet?
If there's a general routine that a worksheet event uses, I'll put it in a
general module. (It might be useful from another worksheet--or just useful for
a macro in a general module.
But if it's a worksheet event, (_beforerightclick, _change, _selectionchange),
these have to be in the worksheet module (well, if they're common between
worksheets, you could also put the "expanded" version behind the ThisWorkbook
module.
In one worksheet module, you could have this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
...
End sub
But if it's really the same code over and over and over, you could use a
workbook event. Excel will pass you the worksheet that's changing (not
necessary in the individual worksheet_selectionchange event--since you're only
on that one worksheet). And it'll pass you the target (the range selected).
The target gets passed in both procedures.
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)
...
end sub
=========
I'd keep all my events where they belong--either behind the worksheet or behind
the workbook. But the General routines in general modules.
Chip Pearson has a white paper at:
http://www.cpearson.com/excel/events.htm
You may want to take a look at it.
He also has a sample workbook that will show how the events fire (and in what
order) at:
http://www.cpearson.com/excel/download.htm
Look for EventSeq.
> I ask this question due to being a novice at programming
> writing, I usually record a macro first, then with help
[quoted text clipped - 97 lines]
> >ec35720@msn.com
> >.

Signature
Dave Peterson
ec35720@msn.com