在Excel对象库中是否有一个界面来设置打印首选项以打印整个工作簿而不是活动工作表?
答案 0 :(得分:0)
不,PageSetup仅适用于工作表
您可以做的最好是复制所需设置的宏
Sub CopyPageSetup()
Dim sh As Worksheet, cl As Range
Dim shBase As Worksheet
Set shBase = ActiveSheet
For Each sh In ActiveWindow.SelectedSheets
If sh.Name <> shBase.Name Then
sh.PageSetup.Orientation = shBase.PageSetup.Orientation
' Add other PageSetup properties here '
' unfortunately sh.PageSetup = shBase.PageSetup does not work '
End If
Next
End Sub