MacOS users see 1004 error when accessing XLSM via SP/Teams

New Contributor

Hi all, I am wondering if anyone may be able to assist me? I have a macro enabled excel document with an external data connection table within it, hosted on Sharepoint and accessible by the team from within Teams. The macro unlocks, refreshes the data table and then locks Sheet13.

 

All team members are members of the Team, and all are also members of the (separate) Sharepoint site that holds the external data connection: the Sharepoint List (which builds the table).

 

A User running Windows has been able to click the file in Teams, Open in Desktop, enable Macros and can see the updated data in the table. They can use the file with no issue.

 

However when sending to MacOS users, they are (both) reporting back that they get a Runtime : 1004 error and the table will not update.

 

One advises they see a 1004: "[Expression .Error] The module named 'Sharepoint' has been disabled in this context"

The other sees 1004: Method 'Refresh' of object '_QueryTable' failed.

 

I don't believe the error is in my VBA as the Windows user has no issue, however I could be wrong. I've managed to jump hurdles around VBA, Sharepoint/Teams , file permissions to get it this far, but these unique errors have me stumped. Here is the code:

 

 

 

Sub Unlock_Refresh_Lock_v2()
  With Sheet13
    .Unprotect "3465"
    .Range("G6").ListObject.QueryTable.Refresh BackgroundQuery:=False
    .Protect "3465", DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowUsingPivotTables:=True
  End With
End Sub

 

 

 

I would greatly appreciate any clues as to what to try next if possible? Thankyou!

0 Replies