Jul 23 2018
10:33 AM
- last edited on
Jul 25 2018
10:09 AM
by
TechCommunityAP
Jul 23 2018
10:33 AM
- last edited on
Jul 25 2018
10:09 AM
by
TechCommunityAP
I built a macro that uses the function Workbook_Open() and then executes stuff which, as I understand it, should kick off as soon as the spreadsheet it opened. I've saved the spreadsheet as .xlsm and I can run the macro manually but it doesn't run itself when the spreadsheet is opened. I think the spreadsheet was originally created using 2003 and I'm using it in 2010. Could that be the problem?
Feb 08 2019 10:45 AM
Jul 17 2019 02:17 AM
Some other ideas;
Make sure the sub is within the "ThisWorkbook" module and called exactly "Private Sub Workbook_Open()". Not in another module, form, worksheet, or class, and obviously on the correct workbook.
"Application.EnableEvents = False" turns off events. If this is ran on another workbook it will stop your workbook from running it's "Workbook_Open". Make sure this is on.
"Workbook_Open" still needs macros to be enabled to run. The trust center options defines how these act but as best practice should be set to always warning. There are further additions from a development end to make sure there is a "splash screen" so the user can not use the tool till macros are enabled if need be.
Hope one of these help?
Alistair Blades - BespokeExcel