Hi all,
I'm using an Excel file at work that has a lot of macros in it (e.g. to automatically copy content from a to b). Those macros do not work if the file is opened in browser, e.g. via a sharepoint / onedrive link that was shared.
So far, I've always added big fat red letters on every spreadsheet that the file needs to be opened locally, i.e. in client, for it to work properly.
Sadly, this is often ignored so colleagues add content to the spreadsheet, but the macros cannot execute so the file is basically useless from that point.
Is there any way to show a pop-up to remind colleagues to open in client, when the file is opened in browser?
Is there VBA code that can still execute in browser?
I found the following in another forum and it's supposed to tell if the file is read-only or not if opened on sharepoint. Thought maybe this can be tweaked somehow?
Private Sub Workbook_Open()
If Workbooks.CanCheckOut(filename:=ActiveWorkbook.FullName) = False Then
MsgBox ("The file is opened as read-only from the server.")
Else
[code to do stuff]
End If
Any help is appreciated! 
Thank you!
Bookmarks