请教,如何使用Excel VBA,将窗体水平和垂直居中打印?谢谢。

2025年03月22日 08:09
有2个网友回答
网友(1):

当然是可以的了,在printout输出前加入以下代码,设置水平和垂直居中
With ActiveSheet.PageSetup
.CenterHorizontally = True
.CenterVertically = True
End With

网友(2):

不能直接设置,可以考虑用文本框的高度和字体大小来调节