Hello,
Turning prompts/alerts off and on in excel is easy with:
However, I am working in a shared workbook. When I want to unshare the workbook, i dont want the prompt "am i sure" bit etc.
Adding the bit above, it doesnt work, any ideas, i really need this to work without user prompt (I can get it to share without it lol)
Many thanks for this
Turning prompts/alerts off and on in excel is easy with:
Code:
Application.DisplayAlerts = False
' Your code
Application.DisplayAlerts = True
Adding the bit above, it doesnt work, any ideas, i really need this to work without user prompt (I can get it to share without it lol)
Code:
Sub unshareme()
Application.DisplayAlerts = False '
If ActiveWorkbook.MultiUserEditing Then
ActiveWorkbook.ExclusiveAccess
End If
Application.DisplayAlerts = True
End Sub