Sub KeepShared()
Dim sFile As String
Dim sMsg As String
Dim iUsers As Integer
Dim iAnswer As Integer
With ActiveWorkbook
If.MultiUserEditing Then
sFile =.Name
iAnswer = vbYes
iUsers = UBound(.UserStatus)
If iUsers > 1 Then
sMsg = sFile & ' is also open by ' & _
iUsers - 1 & ' other users: '
For x = 2 To iUsers
sMsg = sMsg & vbCrLf &.UserStatus(x,1)
Next
sMsg = sMsg & vbCrLf & vbCrLf & 'Proceed? '
iAnswer = MsgBox(sMsg, vbYesNo)
End If
If iAnswer = vbYes Then
.ExclusiveAccess
.SaveAs Filename: =sFile, AccessMode: =xlShared
End If
End If
End With
End Sub
This poem has not been translated into any other language yet.
I would like to translate this poem