Workbook_Open Not working!!!

atf32

Board Regular
Joined
Apr 13, 2011
Messages
157
Working in MS Excel 2010
:confused:
HELP!! I have a problem where "Workbook_Open" does not execute when I open the file. It is in a trusted location and I even put "stop" in the beginning of the code, before I saved and closed the file.... And the code never executed. I even created a simple blank macro-enabled file, with a "Workbook_Open" sub, that included a "stop" line, and that works as expected (i.e., stopped on "stop" line).
 
Hi

Im no Expert here but I found that if you have open a workbook with this code and you open another file the function will stop working
Private Sub Workbook_Open()
Application.EnableEvents = False

What I did I put Application.EnableEvents = true before the thing ends.

Private Sub Workbook_Open()
Application.EnableEvents = False


Application.EnableEvents = true

End
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,215,336
Messages
6,124,328
Members
449,155
Latest member
ravioli44

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