1. I don't have an elegant solution for this, but I have a workaround.
Instead of
using WorkBook events, use WorkSheet events:
Private Sub Worksheet_Activate()
Application.Cursor = xlNorthwestArrow
End Sub
Private Sub Worksheet_Deactivate()
Application.Cursor = xlDefault
End Sub
Copy & paste the code above into the code page for each sheet where the
cursor
should be altered this way. Create a Workbook_Open sub like the following in
the
ThisWorkbook module:
Private Sub Workbook_Open()
Sheets("Sheet1").Activate
End Sub
Change Sheet1 to the name of one of the sheets with the Worksheet_Activate
event
code. This is to ensure that the Worksheet_Activate event gets triggered.
None of this, in itself, fixes the VBE cursor problem. When you are in the
VBE, the active window is still the active worksheet, not the VBE. You will
see this if you run the following sub in the VBE:
Sub AAAAA()
MsgBox ActiveWindow.Caption
End Sub
So, the workaround is to have at least one sheet that does NOT have the
cursor-changing event code. Make that the active sheet before you go to the
VBE. You could put it in a macro like this:
Sub GotoVBE()
ThisWorkbook.Sheets("Sheet4").Activate
Application.SendKeys "%{F11}"
End Sub
There may be a slick way (maybe using API calls) to determine when you are
in the VBE. Perhaps one of the MVPs knows, and can enlighten us both.
2. I don't have a solution for this. Double-clicking a cell border doesn't
trigger any events I can identify - not Worksheet_BeforeDoubleClick, and not
Workbook_SheetBeforeDoubleClick. Tell your users to click in the middle of
the cells.
Hope this helps,
Hutch