VBA not turning off autosave function for some people

jasonfish11

Board Regular
Joined
May 14, 2015
Messages
56
I've got an issue that might be related to excel, sharepoint or possibly the internet browser being used.

The basis of the issue is I have coding in a workbook that should turn the autosave function off when the workbook is opened...

VBA Code:
Private Sub Workbook_Open()
If ActiveWorkbook.AutoSaveOn = True Then
ActiveWorkbook.AutoSaveOn = False
End If

The workbook being accessed is housed on SharePoint Online, and people are asked to access it via Edge (not chrome, due to other chrome issues).

There are about 30 people that use this workbook, and for 3 of them when they open the workbook autosave does NOT turn off. There are other people who I've made sure have the default of "auto-save" being on open it and it works fine.

I can't find a reason why this would work for most people but not work for some.

Has anyone ran into this before?
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
I am pretty sure VBA does not work if you open the workbook on-line, only if you download it to your desktop and open it there.
 
Upvote 0
I am pretty sure VBA does not work if you open the workbook on-line, only if you download it to your desktop and open it there.

Sorry to be more clear people are opening the workbook to their excel desktop app. Not opening it to excel online (in the browser window).

And this function still works for some people and not for others.
 
Upvote 0
For the people who it does not work for, have they enabled macros?

A simple way to check would be to add this line to your code:
VBA Code:
Private Sub Workbook_Open()
    MsgBox "Macros are enabled!"
    If ActiveWorkbook.AutoSaveOn = True Then
        ActiveWorkbook.AutoSaveOn = False
    End If
If they get the message box, then they know that macros have been enabled.
 
Upvote 0
For the people who it does not work for, have they enabled macros?

A simple way to check would be to add this line to your code:
VBA Code:
Private Sub Workbook_Open()
    MsgBox "Macros are enabled!"
    If ActiveWorkbook.AutoSaveOn = True Then
        ActiveWorkbook.AutoSaveOn = False
    End If
If they get the message box, then they know that macros have been enabled.

Thank you,
This is very interesting the people who are having the issue do not see the message but everyone else does.
So it has to do with their settings on how Excel opens when they open it from a website I guess.
 
Upvote 0
They will need to download it to their Desktop and run it from there.
You may want to double-check to make sure that they are doing that.
And then when they are opening it, they may be alerted that macros have been disabled. So they need to make sure to enable them on their computer for that file so that they will run.
One easy way is to create a Trusted Location on their computer, and download the files to there before opening them.
See: Add, remove, or change a trusted location in Microsoft Office - Microsoft Support.
 
Upvote 0

Forum statistics

Threads
1,215,084
Messages
6,123,029
Members
449,092
Latest member
ikke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top