Excel - Ayuda con fecha

 
Vista:
sin imagen de perfil
Val: 33
Ha mantenido su posición en Excel (en relación al último mes)
Gráfica de Excel

Ayuda con fecha

Publicado por Cristhian (24 intervenciones) el 19/06/2019 15:31:39
Hola amigos que tal, espero que todos se encuentren bien...
Les escribo para solicitar su ayuda sobre algo especifico.
Tengo un código el cual me copia una hoja de Excel a un nuevo libro, lo ajusta, le agrega el encabezado con logo, pero cuando le pongo la fecha (al lado derecho) no me la muestra y en su lugar me muestra la ruta donde se guarda el archivo.

Acá dejo el código donde se inserta la fecha:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
' Aquí ajusto la pagina para impresión.
 
    Columns("C:C").ColumnWidth = 21.43
    Columns("C:C").ColumnWidth = 24.43
    Columns("D:D").ColumnWidth = 19.86
    Columns("E:E").EntireColumn.AutoFit
    Columns("F:F").ColumnWidth = 13.29
    Columns("G:G").EntireColumn.AutoFit
    Columns("H:H").EntireColumn.AutoFit
    Columns("I:I").EntireColumn.AutoFit
    Columns("F:F").ColumnWidth = 15.14
    Columns("D:D").ColumnWidth = 21.86
    ActiveWindow.DisplayZeros = False
    ActiveSheet.PageSetup.LeftHeaderPicture.Filename = _
        "C:\Mis Documentos\Imagenes\Atlanta\prueba2.jpg"
    With ActiveSheet.PageSetup.LeftHeaderPicture
        .Height = 45.75
        .Width = 48
    End With
    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
        .PrintTitleRows = ""
        .PrintTitleColumns = ""
    End With
    Application.PrintCommunication = True
    ActiveSheet.PageSetup.PrintArea = ""
    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
        .LeftHeader = "&G"
        .CenterHeader = _
        "&""Tahoma,Negrita""&14IMPORTADORA Y EXPORTADORA NUEVA ATLANTA LTDA."
 
        .RightHeader = "&"    (se supone que aquí debería ingresar la fecha)
 
        .LeftFooter = ""
        .CenterFooter = ""
        .RightFooter = ""
        .LeftMargin = Application.InchesToPoints(0.31496062992126)
        .RightMargin = Application.InchesToPoints(0.118110236220472)
        .TopMargin = Application.InchesToPoints(0.866141732283465)
        .BottomMargin = Application.InchesToPoints(0.15748031496063)
        .HeaderMargin = Application.InchesToPoints(0.31496062992126)
        .FooterMargin = Application.InchesToPoints(0.31496062992126)
        .PrintHeadings = False
        .PrintGridlines = False
        .PrintComments = xlPrintNoComments
        .PrintQuality = 600
        .CenterHorizontally = False
        .CenterVertically = False
        .Orientation = xlPortrait
        .Draft = False
        .PaperSize = xlPaperLetter
        .FirstPageNumber = xlAutomatic
        .Order = xlDownThenOver
        .BlackAndWhite = False
        .Zoom = 70
        .PrintErrors = xlPrintErrorsDisplayed
        .OddAndEvenPagesHeaderFooter = False
        .DifferentFirstPageHeaderFooter = False
        .ScaleWithDocHeaderFooter = True
        .AlignMarginsHeaderFooter = True
        .EvenPage.LeftHeader.Text = ""
        .EvenPage.CenterHeader.Text = ""
        .EvenPage.RightHeader.Text = ""
        .EvenPage.LeftFooter.Text = ""
        .EvenPage.CenterFooter.Text = ""
        .EvenPage.RightFooter.Text = ""
        .FirstPage.LeftHeader.Text = ""
        .FirstPage.CenterHeader.Text = ""
        .FirstPage.RightHeader.Text = ""
        .FirstPage.LeftFooter.Text = ""
        .FirstPage.CenterFooter.Text = ""
        .FirstPage.RightFooter.Text = ""
    End With
 
 
    With ActiveSheet.PageSetup
    RigthHeader = Format(FECHA, "DD/MMMM/YYYY")
    Application.PrintCommunication = True
    ActiveSheet.PageSetup.PrintArea = ""
 
    End With
 
    Application.PrintCommunication = True
    ActiveWorkbook.Save
 
    ActiveSheet.Cells(1, 2).Select
    Range("A2").Select
 
End Sub

Espero puedan ayudarme. de ante mano muchas gracias.

Atte.
Cristhian
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder