gpt-3.5-turbo-0613· openai
Suzhen/CodeChat
I need an excel 365 macro that will enable events
- User
I need an excel 365 macro that will enable events
- Assistant
Here is an example of a macro that enables events in Excel 365:
Sub EnableEvents() Application.EnableEvents = True MsgBox "Events have been enabled." End SubTo use this macro, follow these steps:
- Open Excel and press
Alt + F11to open the VBA editor. - In the VBA editor, go to Insert > Module to insert a new module.
- Copy and paste the above macro code into the module.
- Close the VBA editor.
- Press
Alt + F8to open the macro dialog. - Select the "EnableEvents" macro and click the "Run" button.
After running the macro, events will be enabled in Excel 365 and you will see a message box confirming it.
- Open Excel and press