![]() |
Worksheet events inactive
On opening one of my workbooks this morning I found that all the worksheet
events were inactive (BeforeRightClick, Activate etc). As a consequence my popup menus wouldn't appear (BeforeRightClick) neither would toolbars appear and disappear in response to the Activate and Deactivate events. After I closed the workbook and reopened it, there was no change but things got back to normal after I had shut down Excel and reopened it. All is now well but I am puzzled what might have caused the problem. ANy suggestions? -- David Stevenson, UK |
Worksheet events inactive
Sounds like you have some code somewhere that is disabling events,
Application.EnableEvents = False -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "David" wrote in message ... On opening one of my workbooks this morning I found that all the worksheet events were inactive (BeforeRightClick, Activate etc). As a consequence my popup menus wouldn't appear (BeforeRightClick) neither would toolbars appear and disappear in response to the Activate and Deactivate events. After I closed the workbook and reopened it, there was no change but things got back to normal after I had shut down Excel and reopened it. All is now well but I am puzzled what might have caused the problem. ANy suggestions? -- David Stevenson, UK |
Worksheet events inactive
I suspect there is a open event macro that ran and failed. the macro probaly
disabled event when it opened and then when reaching the error didn't re-enable the events. "David" wrote: On opening one of my workbooks this morning I found that all the worksheet events were inactive (BeforeRightClick, Activate etc). As a consequence my popup menus wouldn't appear (BeforeRightClick) neither would toolbars appear and disappear in response to the Activate and Deactivate events. After I closed the workbook and reopened it, there was no change but things got back to normal after I had shut down Excel and reopened it. All is now well but I am puzzled what might have caused the problem. ANy suggestions? -- David Stevenson, UK |
Worksheet events inactive
David,
I assume when you refer to menus your referring to those created by yopurself becuase this suggestion doesn't efect normal right-click sheet menus. One way this problem can occur is if a macro crashes or stops half way through with events disabled. For example this would be quite common coding:- Application.enableevents=false do something Application.enableevents=true As you will see if the macro stops without completing events will be disabled. I suggest you have a look if you have code that does this on opening a workbook. Mike "David" wrote: On opening one of my workbooks this morning I found that all the worksheet events were inactive (BeforeRightClick, Activate etc). As a consequence my popup menus wouldn't appear (BeforeRightClick) neither would toolbars appear and disappear in response to the Activate and Deactivate events. After I closed the workbook and reopened it, there was no change but things got back to normal after I had shut down Excel and reopened it. All is now well but I am puzzled what might have caused the problem. ANy suggestions? -- David Stevenson, UK |
Worksheet events inactive
Many thanks for helpful replies, Bob and Joel. I'll investigate further but
my immediate reaction is that I'm pretty sure I don't have any event disabling code anywhere associated with this workbook. All my workbook_open event does is to call a procedure to build a new main toolbar and to hide the standard and formatting bars. It also builds my popup toolbars ready for showing on specific sheet's RightClick events. -- David Stevenson, UK "Joel" wrote: I suspect there is a open event macro that ran and failed. the macro probaly disabled event when it opened and then when reaching the error didn't re-enable the events. "David" wrote: On opening one of my workbooks this morning I found that all the worksheet events were inactive (BeforeRightClick, Activate etc). As a consequence my popup menus wouldn't appear (BeforeRightClick) neither would toolbars appear and disappear in response to the Activate and Deactivate events. After I closed the workbook and reopened it, there was no change but things got back to normal after I had shut down Excel and reopened it. All is now well but I am puzzled what might have caused the problem. ANy suggestions? -- David Stevenson, UK |
Worksheet events inactive
Mike,
In answer to your question, yes I do mean my own menus. The standard 'cell' menu appears instead although I was right clicking within the predetermined range set for the RightClick event to intervene and show my own menu. -- David Stevenson, UK "Mike H" wrote: David, I assume when you refer to menus your referring to those created by yopurself becuase this suggestion doesn't efect normal right-click sheet menus. One way this problem can occur is if a macro crashes or stops half way through with events disabled. For example this would be quite common coding:- Application.enableevents=false do something Application.enableevents=true As you will see if the macro stops without completing events will be disabled. I suggest you have a look if you have code that does this on opening a workbook. Mike "David" wrote: On opening one of my workbooks this morning I found that all the worksheet events were inactive (BeforeRightClick, Activate etc). As a consequence my popup menus wouldn't appear (BeforeRightClick) neither would toolbars appear and disappear in response to the Activate and Deactivate events. After I closed the workbook and reopened it, there was no change but things got back to normal after I had shut down Excel and reopened it. All is now well but I am puzzled what might have caused the problem. ANy suggestions? -- David Stevenson, UK |
Worksheet events inactive
I've had a similar problem: my worksheet events just stopped firing today for
no apparent reason. The weird thing is that some embedded controls (e.g. a ComboBox) also no longer activated their own events, but when I created new embedded objects (such as a Button control) these would fire relevant events. I have looked and looked for the 'Application.EnableEvents = false' statement, but I cannot find it anywhere in my code. Can't explain it. Also, when I shut down Excel and started it again, suddenly all of the 'missing' events were working again good as new. "David" wrote: Mike, In answer to your question, yes I do mean my own menus. The standard 'cell' menu appears instead although I was right clicking within the predetermined range set for the RightClick event to intervene and show my own menu. -- David Stevenson, UK "Mike H" wrote: David, I assume when you refer to menus your referring to those created by yopurself becuase this suggestion doesn't efect normal right-click sheet menus. One way this problem can occur is if a macro crashes or stops half way through with events disabled. For example this would be quite common coding:- Application.enableevents=false do something Application.enableevents=true As you will see if the macro stops without completing events will be disabled. I suggest you have a look if you have code that does this on opening a workbook. Mike "David" wrote: On opening one of my workbooks this morning I found that all the worksheet events were inactive (BeforeRightClick, Activate etc). As a consequence my popup menus wouldn't appear (BeforeRightClick) neither would toolbars appear and disappear in response to the Activate and Deactivate events. After I closed the workbook and reopened it, there was no change but things got back to normal after I had shut down Excel and reopened it. All is now well but I am puzzled what might have caused the problem. ANy suggestions? -- David Stevenson, UK |
Worksheet events inactive
Ben, I've had no repeat of the problem since last September when it happened
just that once. Like you I found no code which could possibly have been to blame and put it down to one of the odd Excel glitches. I hope you have the same experience. -- David Stevenson, UK "ben" wrote: I've had a similar problem: my worksheet events just stopped firing today for no apparent reason. The weird thing is that some embedded controls (e.g. a ComboBox) also no longer activated their own events, but when I created new embedded objects (such as a Button control) these would fire relevant events. I have looked and looked for the 'Application.EnableEvents = false' statement, but I cannot find it anywhere in my code. Can't explain it. Also, when I shut down Excel and started it again, suddenly all of the 'missing' events were working again good as new. "David" wrote: Mike, In answer to your question, yes I do mean my own menus. The standard 'cell' menu appears instead although I was right clicking within the predetermined range set for the RightClick event to intervene and show my own menu. -- David Stevenson, UK "Mike H" wrote: David, I assume when you refer to menus your referring to those created by yopurself becuase this suggestion doesn't efect normal right-click sheet menus. One way this problem can occur is if a macro crashes or stops half way through with events disabled. For example this would be quite common coding:- Application.enableevents=false do something Application.enableevents=true As you will see if the macro stops without completing events will be disabled. I suggest you have a look if you have code that does this on opening a workbook. Mike "David" wrote: On opening one of my workbooks this morning I found that all the worksheet events were inactive (BeforeRightClick, Activate etc). As a consequence my popup menus wouldn't appear (BeforeRightClick) neither would toolbars appear and disappear in response to the Activate and Deactivate events. After I closed the workbook and reopened it, there was no change but things got back to normal after I had shut down Excel and reopened it. All is now well but I am puzzled what might have caused the problem. ANy suggestions? -- David Stevenson, UK |
All times are GMT +1. The time now is 03:59 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com