Jack,
Not sure what moExcelApp is, but from the looks of your code, it looks like
it's the SheetChange event handler for the workbook object. If so, then that
event also fires, right after the change event for the sheet.
One way to understand the concept is to do what you have been doing -
experiment with it.
Try this:
1. Create a new workbok.
2. In the ThisWorkbook code module, paste this code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
MsgBox Target.Address & " was changed " & Sh.Name, vbInformation,
"Message from ThisWorkbook"
End Sub
3. In the Sheet1 code module, paste this code:
Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox Target.Address & " was changed in Sheet1", vbInformation,
"Message from Sheet1"
End Sub
Now, edit any cell in Sheet1. You'll see both events fire. The one in
Sheet1 first, followed by the one in ThisWorkbook. Edit any cell in Sheet2.
The Sheet1 change event doesn't fire but the one in the workbook does. So,
if you need your code to apply to all sheets in the workbook, you need to
trap the workbook_sheetchange event. If all you nee to keep track of is one
sheet, do it in the worksheet_change event. Hope that helps.