Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default 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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I email an inactive copy of a worksheet Jackaroo 1281 Excel Discussion (Misc queries) 1 January 1st 09 03:36 PM
copy worksheet from inactive workbook br549 Excel Programming 1 May 22nd 07 02:50 AM
With block does not work on inactive worksheet? Vik[_3_] Excel Programming 1 August 1st 05 10:36 AM
Assign Range - Inactive Worksheet jazzjava Excel Programming 6 June 16th 05 01:39 AM
How to get the activecell of inactive worksheet ? steven[_2_] Excel Programming 5 April 18th 04 12:59 PM


All times are GMT +1. The time now is 06:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"