Application. EnableEvents = true

still learning

Well-known Member
Joined
Jan 15, 2010
Messages
774
Office Version
  1. 365
Platform
  1. Windows
Hi hope all are healthy
I made a toggle button to disable events (or enable events) on a spreadsheet to NOT run (or run) an event marco.
I deleted the spreadsheet and all macros for it. when i didn't need the sheet any more
Then I couldn't get any Private Sub Workbook_open()>>Private Sub Workbook_activate() to work in any workbooks,
or Private Sub Worksheet_open()>>Private Sub Worksheet_activate() in any sheets
I put >>>Application.EnableEvents = True in the workbook that the sheet came from and now all events in all books work.
I'm wondering what I did wrong when I deleted the toggle button and all the macros with it.
I did press the button a few times to remind me what it did before i deleted it


mike
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Sounds like you had disabled events before deleting the code.
 
Upvote 0
Just run this
VBA Code:
Application.EnableEvents=True
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,496
Messages
6,113,995
Members
448,539
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top