Como guardo la hoja numero 1 como pdf con vba
Me gustaria guardar solo la "hoja instruccion" en pdf de un libro de excel tengo el siguiente código y no se en que parte del código lo inserto para que me lo guarde la ruta seria una carpeta en el escritorio les envio el codigo:
Espero haberme hecho entender gracias y felices fiestas y prospero 2020
Sub CommandButton1_Click()
Dim mensaje As String
mensaje = MsgBox("SE INGRESO EL NUMERO DE LOAD/TRACKING?", vbOKCancel, "CONFIRMACION FLEX COAH")
If mensaje = vbOK Then
'incrementa el consecutivo
ActiveSheet.Range("E3").Value = ActiveSheet.Range("E3").Value + 1
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Application.ScreenUpdating = False
Range("B5"). Copy
Worksheets("Datos guardados"). Range("A6"). PasteSpecial xlPasteValues
Range("B6"). Copy
Worksheets("Datos guardados"). Range("B6"). PasteSpecial xlPasteValues
Range("F5"). Copy
Worksheets("Datos guardados"). Range("C6"). PasteSpecial xlPasteValues
Range("F9"). Copy
Worksheets("Datos guardados"). Range("D6"). PasteSpecial xlPasteValues
Range("F6"). Copy
Worksheets("Datos guardados"). Range("E6"). PasteSpecial xlPasteValues
Range("B13"). Copy
Worksheets("Datos guardados"). Range("H6"). PasteSpecial xlPasteValues
Range("F8"). Copy
Worksheets("Datos guardados"). Range("F6"). PasteSpecial xlPasteValues
Range("C15"). Copy
Worksheets("Datos guardados"). Range("G6"). PasteSpecial xlPasteValues
Range("F13"). Copy
Worksheets("Datos guardados"). Range("I6"). PasteSpecial xlPasteValues
Range("B20"). Copy
Worksheets("Datos guardados"). Range("J6"). PasteSpecial xlPasteValues
Range("F20"). Copy
Worksheets("Datos guardados"). Range("K6"). PasteSpecial xlPasteValues
Range("E3"). Copy
Worksheets("Datos guardados"). Range("L6"). PasteSpecial xlPasteValues
Range("F7"). Copy
Worksheets("Datos guardados"). Range("M6"). PasteSpecial xlPasteValues
Sheets("Datos guardados").Select
Rows("6:6").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Worksheets("Hoja instruccion"). Range("B5"). ClearContents
Worksheets("Hoja instruccion"). Range("B6"). ClearContents
Worksheets("Hoja instruccion"). Range("F5"). ClearContents
Worksheets("Hoja instruccion"). Range("F6"). ClearContents
Worksheets("Hoja instruccion"). Range("F9"). ClearContents
Worksheets("Hoja instruccion"). Range("B13"). ClearContents
Worksheets("Hoja instruccion"). Range("F13"). ClearContents
Worksheets("Hoja instruccion"). Range("F8"). ClearContents
Worksheets("Hoja instruccion"). Range("C15"). ClearContents
Worksheets("Hoja instruccion"). Range("B20"). ClearContents
Worksheets("Hoja instruccion"). Range("F20"). ClearContents
End If
End Sub
1 respuesta
Respuesta de Aneudys Martinez
2
