Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Remove On Activate Sheet Event

I have an Excel workbook that I inherited that wants to run an event
every time I activate or deactivate a sheet. I cannot seem to locate
the worksheet events so that I can disable this. There are two
subroutines with names like "OnActivateSheetName" and
"OnDeactivateSheetName". If I simply remove these routines I get a
message that says that these subroutines cannot be found, whenever I
activate (or deactivate) the sheet.

How do I remove this "event" requirement?

Thanks,
Rick

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 130
Default Remove On Activate Sheet Event

You are close. If you press Ctrl+R to bring up the Project Explorer, scroll
through the list until you find your project. Expand the [+] sign next to
the name, and you'll see some folders. One will be called "Microsoft Excel
Objects"; click the [+] to expand that folder. You'll see objects for each
worksheet in the workbook and one object representing the workbook itself.

Worksheet events are stored in these special code modules. Simply double
click on the object that represents the worksheet you are working in. Then,
find and delete all macros (events).

HTH,
Matthew Pfluger


"rcl2884" wrote:

I have an Excel workbook that I inherited that wants to run an event
every time I activate or deactivate a sheet. I cannot seem to locate
the worksheet events so that I can disable this. There are two
subroutines with names like "OnActivateSheetName" and
"OnDeactivateSheetName". If I simply remove these routines I get a
message that says that these subroutines cannot be found, whenever I
activate (or deactivate) the sheet.

How do I remove this "event" requirement?

Thanks,
Rick


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Remove On Activate Sheet Event

Double-Click on 'ThisWorkbook". You'll probably find the calling code
there.

HTH,
Paul

--

"rcl2884" wrote in message
...
I have an Excel workbook that I inherited that wants to run an event
every time I activate or deactivate a sheet. I cannot seem to locate
the worksheet events so that I can disable this. There are two
subroutines with names like "OnActivateSheetName" and
"OnDeactivateSheetName". If I simply remove these routines I get a
message that says that these subroutines cannot be found, whenever I
activate (or deactivate) the sheet.

How do I remove this "event" requirement?

Thanks,
Rick



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Remove On Activate Sheet Event

Matthew,
Thanks for the suggestion. When I double-click on the worksheet, I get
two tabs.. one identified as "general" is blank (no code) while the
other identified as "worksheet" has the following code

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

End Sub

over to the right is a selection of possible events. When I click on
Activate, it creates the code

Private Sub Worksheet_Activate()

End Sub

The action of the workbook is the same whether or not this code is
present. Is there somewhere else where action on this event could be
specified? I am currently using Excel 2003, but I believe the sheet
was originally created in Excel 1997.

Paul writes
"Double-Click on 'ThisWorkbook". You'll probably find the calling
code
there."

There are a lot of properties, but none that seems to correspond to
what I am looking for.

Just to clarify, I know where the codes that gets called is... I just
want to stop the sheet from calling that code. Mainly it is a problem
when I am debugging and jumping from sheet to sheet because I get
error messages saying it cannot process the "OnActivateSheet" macro
while in DeBug mode.

Thanks again, for the help.
...Rick









On May 7, 1:20*pm, Matthew Pfluger
wrote:
You are close. *If you press Ctrl+R to bring up the Project Explorer, scroll
through the list until you find your project. *Expand the [+] sign next to
the name, and you'll see some folders. *One will be called "Microsoft Excel
Objects"; click the [+] to expand that folder. *You'll see objects for each
worksheet in the workbook and one object representing the workbook itself. *

Worksheet events are stored in these special code modules. *Simply double
click on the object that represents the worksheet you are working in. *Then,
find and delete all macros (events).

HTH,
Matthew Pfluger



"rcl2884" wrote:
I have an Excel workbook that I inherited that wants to run an event
every time I activate or deactivate a sheet. I cannot seem to locate
the worksheet events so that I can disable this. There are two
subroutines with names like "OnActivateSheetName" and
"OnDeactivateSheetName". If I simply remove these routines I get a
message that says that these subroutines cannot be found, whenever I
activate (or deactivate) the sheet.


How do I remove this "event" requirement?


Thanks,
Rick- Hide quoted text -


- Show quoted text -


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
Sheet activate method in beforesave event bdg Excel Programming 1 April 1st 06 02:44 AM
Sheet Activate method in beforesave event bdg Excel Programming 0 March 31st 06 05:00 PM
Sheet Activate method in beforesave event bdg Excel Programming 0 March 31st 06 05:00 PM
Return to Current Sheet in On (sheet activate) event macro Paul Moles Excel Programming 1 March 27th 05 03:16 PM
Activate sheet event Mike Fogleman Excel Programming 5 January 18th 04 11:02 PM


All times are GMT +1. The time now is 04:25 PM.

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

About Us

"It's about Microsoft Excel"