Loading...
Random Pearls Random Pearls New Menu
  • All Pearls
    • Random Pearls
  • Computer SW and HW
    • Computer SW and HW  (parent page)
    • Reference  (parent page of Computer SW and HW)
  • New Menu
  • Authors
  •  
  • Contact Us
  • Sign up
  • Login
    Forgot Password?
  • Follow us on
Image Back to Top Back to top
Language Preference
This website has language specific content. Here you can set the language(s) of your preference.

This setting does not affect the current page. It is used only for filtering pages in menus, preview tiles and search results.

It can be changed any time by using the login menu (if you are logged in) or by clicking the Language button on the left bottom of the page.
Log in to save your preference permanently.



If you do not set this preference, you may see a header like This page has 'language_name' content in page preview tiles.
Search
  • Navigation
  • Similar
  • Author
  • More...
You are here:
All Content / Reference / Computer SW and HW / [SOLVED] Macros (global) not working in Excel workbooks opened …
Table of Contents

Subscribe to Our Newsletter
Follow us by subscribing to our newsletter and navigate to the newly added content on this website directly from your inbox!
Login to subscribe to this page.
Categories  
Tags  
Author  
manisar
Author's Display Image

"Whenever you can, share. You never know who all will be able to see far away standing upon your shoulders!"

I write mainly on topics related to science and technology.

Sometimes, I create tools and animation.


[SOLVED] Macros (global) not working in Excel workbooks opened from OneNote

July 25, 2023

Author - manisar


The Issue

In a workbook opened from OneNote (2016), macros are not working, or have stopped working - these are the macros that were earlier saved globally by the user.

If you go to the Macros console from the Developer tab, you'll simply not see the macro(s) there - see the screenshot below - there is no PERSONAL.XLSB to be seen in the "Macros in:" dropdown.

If the macros are not there, consequently, if you had set up shortcut keys, they will not work as well.

No_Personal_Macros

The Reason

The reason behind this issue is that the workbook PERSONAL.XLSB isn't getting opened automatically with Excel (as is supposed to happen and does happen if we start Excel from outside)!

This file is generally located in C:\Users\<username>\AppData\Roaming\Microsoft\Excel\XLSTART, and this is where global macros are saved.

When we start Excel generally, this file is opened automatically and provides its macros to Excel which then become visible to all the other opened workbooks.

You can check this by opening Excel directly (i.e. not via OneNote) - you'll see the cache file created temporarily in the XLSTART location.

Now why OneNote is not able to open this file automatically is probably because it doesn't have its location (...XLSTART/) in its Trusted Locations.

And the insult to injury is that the option to add this location as part of Trusted Locations in OneNote or OneNote 2016 is not there (any longer, seems like it was there earlier).

You can confirm this by going to File -> Options -> Trust Center -> Trust Center Settings.
Here, you will not see any menu item for Trusted Locations if you have come here via OneNote, however, you'll see it if you have come here from Excel, Word etc.!

So, we see that this Trusted Locations for OneNote or OneNote 2016 is different from the Trusted Locations for Office (or any other Office App)!
And hence, even if you have this location configured as a Trusted Location in Microsoft Office in general, that is not going to help with OneNote!

The Workaround

So, for now, the simplest workaround is this.

Simply open Excel from anywhere outside OneNote before opening any workbook from OneNote.

This will open PERSONAL.XLSB in the background and make its macros available to other workbooks.
We don't even need to open any workbook from outside - just that the Excel program is running (before we open any workbook from OneNote) is sufficient.

When we do this, the workbooks that we open from OneNote will see the macros coming from PERSONAL.XLSB - as you can see below.

Excel PERSONAL Macros visible

Well, this is the only way I'm able to make it work as of now.

It's simple but it's a little bit of hassle.
Please let me know in the comments below if you come to know of a better solution to this problem.

Advertisement
Advertisement
Close ad Ad

Advertisement
Close ad Ad

Return to Computer SW and HW

Tell us what you think (select text for formatting, or click )

Copyright © randompearls.com 2020

Privacy Policy