Custom ribbon Workbook_activate issue

shaybarhaim

New Member
Joined
Mar 11, 2014
Messages
2
Hi all,
I have a custom ribbon in my Excel 2007 workbook.
On load my Workbook_activate() function dumps all existing VBA modules and re-loads them from a central repository. This process takes some time (a few seconds).

When loading the modules from a local directory - No problem.
When loading the modules from a server directory, mapped to my PC - I get an error "Can't execute code in break mode".

Apparently, the ribbon is trying to load DURING the time the Workbook_activate() function is still running!!!!

How can I cause them to run one after the other?
 
Found the solution.
Checked the 'programmatic access to the Visual Basic project'

Excel 2007
1.Click the Microsoft Office Button, and then click Excel Options.
2.Click Trust Center.
3.Click Trust Center Settings.
4.Click Macro Settings.
5.Click to select the Trust access to the VBA project object model check box.
6.Click OK to close the Excel Options dialog box.




Excel 2003
1.On the Tools menu, point to Macro, and then click Security.
2.In the Security dialog box, click the Trusted Sources tab.
3.Select the Trust access to Visual Basic Project check box.
4.Click OK.
 
Upvote 0

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