0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

指定したシートの範囲を印刷範囲として設定する

Last updated at Posted at 2015-10-18

自分がよく使うであろう、全列を1シートに収める形式を対象のシートに反映する。
範囲はrangeObjで指定する。

Public Sub setPrintArea(ByVal sheetobj As Worksheet, ByVal rangeObj As Range)
    With sheetobj.PageSetup
        .PrintArea = rangeObj.Address
        .Zoom = False           '---拡大・縮小率を指定しない
        .FitToPagesWide = 1     '---横方向1ページで印刷
        .FitToPagesTall = False '---縦方向は指定しない
    End With
End Sub
0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?