Excel macros work locally but not properly from SharePoint (data validation errors)
Our take
Hey everyone,
I’m troubleshooting an Excel (.xlsm) file stored in SharePoint that relies on macros, and I’m running into a confusing issue.
Originally, users were getting the standard macro block error:
“Microsoft has blocked macros from running because the source of this file is untrusted”
As a test, I copied the file locally (outside of SharePoint), and everything worked perfectly — macros ran with no issues.
However, when using the file from its SharePoint location (via OneDrive sync), things don’t behave the same:
The macro block error is no longer showing
But users now get this error when entering data:
“This value doesn't match the data validation restrictions defined for this cell.”
It feels like the macros are only partially running or something isn’t fully initializing when the file is opened from SharePoint.
To clarify:
The file must remain in SharePoint (we can’t rely on local copies)
The goal is to have users open and use the file directly from the SharePoint/OneDrive synced location
Other teams in our organization have similar macro-enabled files working from SharePoint, so this should be possible
At this point, I’m not sure if this is:
A macro trust/security issue (still partially restricted?)
A data validation dependency that isn’t loading properly
Or something specific to how the file was built
Questions:
Can macros fully run from SharePoint/OneDrive synced locations, or are there limitations?
Has anyone seen data validation errors like this caused by macros not executing fully?
What’s the proper way to make this work — trusted locations, macro signing, or policy changes?
Appreciate any guidance — this one’s been tricky to pin down.
Thanks!
[link] [comments]
Read on the original site
Open the publisher's page for the full experience
Related Articles
- Excel .xlsm files showing “We found a problem with some content” after savingHi everyone, Good day. I’m currently experiencing an issue with Microsoft Excel involving macro-enabled files (.xlsm) that contain VBA code and are stored in Microsoft OneDrive. Scenario: I open an .xlsm file (with VBA), make edits or even just open and save it. When I reopen the same file, I get the error:“We found a problem with some content… Do you want us to try to recover as much as we can?” Additional details: Files created in 2025 were working before, but now they are no longer working even if I did not make any changes. The issue now happens consistently even without modifying the file. What I’ve tried: Opening and repairing the file Saving as a new file Checking OneDrive sync Has anyone encountered this issue recently, especially with OneDrive syncing and .xlsm files? Any suggestions or fixes would be greatly appreciated. Thank you in advance for your help. https://preview.redd.it/wycqd6215fzg1.jpg?width=362&format=pjpg&auto=webp&s=a695ef001723887a5f9739c96e92bc21f0b5ab1e submitted by /u/Electronic-Tear-4567 [link] [comments]
- Optimizing data entry in Excel file on SharePoint w/ 5 users: Is MS Forms + Power Automate the way?I want to optimize data entry for an Excel spreadsheet stored on SharePoint, used by 5 data enterers. It has around 300 entries/rows and 17 columns on the main worksheet. 4 other worksheets contain additional variables/columns for the same entries on the main worksheet. 8 other worksheets contain extensive instructions for the systematic literature review we are conducting. Edit: Our current approach has each of us open the Excel file in our desk top app for data entry. The issues I want to solve are: Improved data entry environment: 1) Some cells end up with extensive/long text entries. Users resize cells to optimize their view, but that screws up other people's views. We need data entry solution that allows large data entry areas for certain Excel cells, but not others. 2) Decrease users mistakenly entering data in wrong cell. formatting issues caused by each user doing their own rogue formatting (Despite discussing not messing with formatting in couple of meetings, these people, led by our boss, keep doing it!) excel sheet freezing for short periods of time mouse pointer highlighting cells above the cell to which it is pointing A bit of Googling led me to MS Forms + Power Automate. Would this solve the issues described above and be stable. Is there a better solution? Background Info I'm an intermediate/advanced excel user with experience in VBA, SQL, and stats packages (eg, SAS) working at a large federal agency Excel version: MS 365 MSO v2603 We have MS Forms and Power Automate in-house submitted by /u/tenbsmith [link] [comments]
- Excel with VBA code in SharePoint not workingI have an excel file which has some vba code, I have moved to file to SharePoint but when I open that file, the VBA code part is not working - this is excel in web. I have synced to file on OneDrive, here when I open the excel in desktop, the VBA code part is working well. I have a question if multiple users update that excel at the same time, will it sync properly? if not what can be done? because I have se en sync issues sometimes with OneDrive and SharePoint. submitted by /u/tota_duckling [link] [comments]
- Visual Basic Error when using MacrosHello Community, we got some excel file with macros from an agency we work with. On domain users in our network it brings this error: Microsoft Visual Basic for Applications File not found: C:/users/(username)/appdata/local/temp/*.tmp Those files mostly begin with VB*.tmp This error doesn´t occur on local users / domain-admins I have already worked through all excel gpos regarding macros and safety. I have already marked the file as safe and also the network directory in which it is stored. It also will not work when saved locally with a domain-user (it only worked once) Maybe someone can help me. Thanks in advance! submitted by /u/Maleficent-School762 [link] [comments]