1004在共享工作簿中不可用

我试图做一个macros,将细胞从选区移动到右边(通过5个五格)。 它工作正常,直到我分享工作簿,是否有任何简单的解决方法?

Sub dodaj_akcje() ' ' dodaj_akcje Macro ' ' Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove Range("C1:F1").Select Selection.Copy ActiveSheet.Range("c1").End(xlDown).Offset(1, 0).Select ActiveSheet.Paste Columns("I:M").Select With Selection.Validation .Delete .Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop, Operator _ :=xlBetween .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End Sub 

盲注,但我认为有一些要求,以保持工作表“交易”。 在macros的开始处尝试: Sheets("Sheet1").Protect并在结尾Sheets("Sheet1").Unprotect