View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Macro Error stops App Macro

For the right click to stop working, there is probably code in one of the
macros which turns off events

Application.EnableEvents = False


The other macro has to be fixed so when there is an error events get turned
on again.


"Steven" wrote:

I have the following code that is run on a right click in the application:

Private Sub App_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As
Range, Cancel As Boolean)
'.....code
End Sub

But if there is an error in a macro from another excel file then this
App_SheetBeforeRightClick does not work and defaults back to the default
right click. Is there a way to make it so an error in a macro from another
excel file will not affect the App_SheetBeforeRightClick macro.

Thank you,

Steven