Remove sharing
Sub RemoveSharing() Dim wb As Workbook Set wb = Application.Workbooks.Open("\\public\shared.xls", , , , "pass1", "pass2") wb.UnprotectSharing pass3 wb.WritePassword = "" wb.Password = "" End Sub