Al momento de ejecutar la macro me sale un error 1004, solo funciona una vez guardo cambios y sale el error

2 envíos / 0 nuevos
Último envío
karelanda
Imagen de karelanda
Offline
última acción: Hace 4 años 10 meses
alta: 13/05/2019 - 20:56
Puntos: 35
Al momento de ejecutar la macro me sale un error 1004, solo funciona una vez guardo cambios y sale el error

 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

Etiquetas: 

Cron
Imagen de Cron
Offline
última acción: Hace 8 meses 2 días
Nivel 1 - 200 puntosNivel 2 - 500 puntosNivel 3 - 1000 puntosNivel 4 - 2000 puntosNivel 5 - 4000 puntos
alta: 23/06/2010 - 12:30
Puntos: 12735
Hola Deberías decirnos en qué

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