LoginSignup
2
4

More than 3 years have passed since last update.

excelのvbaで複数シートを1ファイルのpdfにする

Last updated at Posted at 2020-06-11
Worksheets("Sheet1").ExportAsFixedFormat Type:=xlTypePDF, Filename:="test.pdf"

が基本だが、これだと1シート1pdf。

複数シート1pdfにするには下記。

Sheets(Array("Sheet1", "Sheet2")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="test.pdf"

下記ではダメ

Sheets(Array("Sheet1", "Sheet2")).ExportAsFixedFormat Type:=xlTypePDF, Filename:="test.pdf"
2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4