使用VBA設置打印頁面高度和寬度


使用VBA設置打印頁面高度和寬度(一般需要設置在一頁紙的時候)

 

 

1 Sub Setprintpage() '設置打印頁面為縮放到一頁
2     Application.PrintCommunication = False '關掉打印通訊
3     With ActiveSheet.PageSetup
4         .Zoom = True
5         .FitToPagesWide = 1
6         .FitToPagesTall = 1
7     End With
8     Application.PrintCommunication = True '恢復打印通訊
9 End Sub

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM