印刷範囲の設定 | |
---|---|
[195258] 印刷範囲の設定- ■親トピック/記事引用/メール受信=OFF■ □投稿者/ MiTU- -(2022/09/12(18:04)) □U R L/ A B C D E F G H I J K L M N O P 勤務日 社員番号 |
[195259] (削除)- ■記事引用/メール受信=OFF■ □投稿者/ / -(2022/09/12(20:07)) □U R L/ この記事は削除されました |
[195260] Re[2]: 印刷範囲の設定- ■記事引用/メール受信=OFF■ □投稿者/ 半平太 -(2022/09/13(09:22)) □U R L/ こんなのが参考にならないですか? Sub Macro1() Dim aCell As Range ActiveSheet.ResetAllPageBreaks ActiveSheet.PageSetup.PrintTitleRows = "$1:$1" ActiveSheet.PageSetup.PrintArea = Range("D1", Cells(Rows.Count, "B").End(xlUp).Offset(, 13)).Address ActiveSheet.PageSetup.Orientation = xlLandscape '横長 For Each aCell In Range("B2", Cells(Rows.Count, "B").End(xlUp)) If aCell - Day(aCell) <> aCell.Offset(1) - Day(aCell.Offset(1)) Then ActiveSheet.HPageBreaks.Add Before:=aCell.Offset(1) End If Next aCell End Sub |
このトピックに書きこむ |
---|