0% found this document useful (0 votes)
25 views2 pages

Vba

The document contains code for a macro that exports a specific page range of a worksheet as a PDF and then prints that same page range. The macro selects different worksheets before and after running the export and print functions.

Uploaded by

adilson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Vba

The document contains code for a macro that exports a specific page range of a worksheet as a PDF and then prints that same page range. The macro selects different worksheets before and after running the export and print functions.

Uploaded by

adilson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Sub NR_18_2()

'Sub Criar_PDF()

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="Relatório de Vendas", _

Quality:=xlQualityStandard, _

IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _

True

' NR_18_2 Macro

'

'

Sheets("NR 18").Select

ActiveWindow.SelectedSheets.PrintOut From:=2, To:=2, Copies:=1, Collate _

:=True, IgnorePrintAreas:=False

Sheets("LANÇAMENTOS").Select

End Sub
SALVA PDF E IMRIME PAGINA 2

Sub NR_18_2()

'Sub Criar_PDF()

Sheets("NR 18").Select

ActiveSheet.ExportAsFixedFormat From:=2, To:=2, Type:=xlTypePDF, Filename:="Relatório


de Vendas", _

Quality:=xlQualityStandard, _

IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _

True

' NR_18_2 Macro

'

'

Sheets("NR 18").Select

ActiveWindow.SelectedSheets.PrintOut From:=2, To:=2, Copies:=1, Collate _

:=True, IgnorePrintAreas:=False

Sheets("LANÇAMENTOS").Select

End Sub

You might also like