Application.ScreenUpdating = False
ActiveSheet.Protect Password:="CDS-MTY2019", UserInterfaceOnly:=True, AllowFormattingColumns:=True, _
AllowFormattingCells:=True, AllowFormattingRows:=True
Range("F6,F7,F8,F9,F10,F11,F12,F13,F14,F15,F16").Select
Range("F16").Activate
Selection.Copy
Sheets("Base de datos ").Select
Range("B6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Application.CutCopyMode = False
Rows("6:6").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("B7:L7").Select
With Selection.Font
.ColorIndex = xlAutomatic
.TintAndShade = 0
End With
With Selection.Font
.Name = "Arial"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.TintAndShade = 0
.ThemeFont = xlThemeFontNone
ActiveSheet.Protect Password:="CDS-MTY2019", UserInterfaceOnly:=True, AllowFormattingColumns:=True, _
AllowFormattingCells:=True, AllowFormattingRows:=True
End With
Range("A4").Select
Sheets("Portada").Select
Range("F6").Select
Application.ScreenUpdating = True
End Sub
Hola
Deberías decirnos en qué línea te sale el error. También podría ser útil el texto que acompaña al mensaje de error, pues el 1004 es un error genérico.
Un saludo