Microsoftin laskentataulukko-ohjelmistoperhe, joka sisältää työkaluja tietojen analysointiin, kaavioiden luomiseen ja viestintään.
(Please note that this is Finnish Q&A Forum, any threads should be posted in Finnish. However, I will still provide an answer in English based on your initial response.)
Hi, MT Kulmala
This usually happens because Windows/Office now treats shared OneDrive files as coming from an untrusted internet or network location, so Excel blocks macros by default. Trusted Locations alone may not be enough unless the file is opened from the right path and Excel is allowed to trust network documents.
Here are some suggestions you can try:
In Excel, add the synced local OneDrive folder as a Trusted Location, not just the web link.
In Trust Center > Trusted Locations, turn on Allow Trusted Locations on my network.
In Trust Center > Trusted Documents, turn on Allow documents on a network to be trusted, then reopen the file and choose Enable Content/Trusted Document.
If you want a cleaner office-wide fix, it is recommended that you digitally sign the VBA project and use Disable VBA macros except digitally signed macros.
Thank you for your patience in reading, I hope this information has been helpful to you.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment."
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.