admin管理员组文章数量:1123687
I have been having issues with co-authoring where a yellow alert banner pops up indicating that autosave has been switched off and is unable to be switched back on. Not everyone in the group notices this when it happens causing some changes to be lost.
I am aiming to have the workbook check if autosave is on every time there is a change in the sheet. The aim is also to switch it back on when possible or to proceed to the error handler and prompt the user to close and re-open the sheet when it is not able to do so.
However, I cannot seem to get it to work, the msgbox does not display when this happens. Below is the subroutine.
Public Sub CheckAutoSave() 'add to Thisworkbook sheetchange
With ActiveWorkbook
If .AutoSaveOn = False Then
.AutoSaveOn = True
On Error GoTo AutoSaveErrHandler
GoTo SkipErrHandler
AutoSaveErrHandler:
MsgBox "AutoSave failed to turn on, Re-open file.", vbOKOnly
SkipErrHandler:
End If
End With
End Sub
本文标签: excelHow do I check If autosave is on and then switch it back on if it is notStack Overflow
版权声明:本文标题:excel - How do I check If autosave is on and then switch it back on if it is not? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736586633a1945021.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论