Mohon bantuan bagaimana agar kode VBA saya bisa jalan saat keluar dari workbook 
pada mode protect sharing workbook. permasalahan yang terjadi jika setelah kode 
penyimpanan FilesaveAs... kemudian dilanjutkan dengan Excel.Application.Quit. 
Workbook saya setelah dibuka kembali dalam kondisi macro di disabled ternyata 
shared workbook tidak protect. tolong dilengkapi kode saya agar shared workbook 
protect saat kondisi macro dinonaktifkan dan unsharing workbook saat macro 
enabled Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim relatifPath As 
String Dim sh As Worksheet Dim shtrans As Worksheet Application.EnableEvents = 
True Application.ScreenUpdating = False Application.Calculation = 
xlCalculationManual Application.IgnoreRemoteRequests = False 
Application.EnableCancelKey = xlDisabled 
ThisWorkbook.VBProject.VBE.MainWindow.Visible = False Application.OnKey 
"%{F11}" If Not ActiveWorkbook.MultiUserEditing Then Set shtrans = 
ThisWorkbook.Sheets("TRANSAKSI") shtrans.Activate shtrans.Visi
 ble = -1 shtrans.Select For Each sh In ThisWorkbook.Worksheets If sh.Name <> 
"TRANSAKSI" Then sh.Visible = 2 End If Next sh Range("A1").Select 
Application.DisplayAlerts = False ActiveWorkbook.KeepChangeHistory = False 
ActiveWorkbook.ProtectSharing Sharingpassword:="pass" relatifPath = 
ThisWorkbook.Path & "\" & ActiveWorkbook.Name ActiveWorkbook.SaveAs 
Filename:=relatifPath, FileFormat:= _ xlExcel12, AccessMode:=xlShared 
Application.DisplayAlerts = True End if Excel.Application.Quit End Sub dan pada 
saat workbook dibuka macro tidak jalan Private Sub Workbook_Open() 'If 
ActiveWorkbook.MultiUserEditing Then Application.DisplayAlerts = False 
Application.DisplayAlerts = False ActiveWorkbook.UnprotectSharing 
Sharingpassword:="pass" Application.DisplayAlerts = True 
Application.DisplayAlerts = True 'End If End Sub

Kirim email ke