网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容 知识问答

Excel VBA 页面设置

时间:2024-10-14 07:07:28

1、打开新建一个并打开EXCEL工作表

Excel VBA 页面设置Excel VBA 页面设置

4、如果我们想直接设置厘米单位,我们这一将代码改为如下:Sub 初始化设置() ActiveSheet.Cells.RowHeight = 16 ActiveSheet.Cells.ColumnWidth = 9 With ActiveSheet.PageSetup .LeftMargin = Application.CentimetersToPoints(0.5) .RightMargin = Application.CentimetersToPoints(0.5) .TopMargin = Application.CentimetersToPoints(1.5) .BottomMargin = Application.CentimetersToPoints(1) '底 .HeaderMargin = Application.CentimetersToPoints(0.5) '页眉 .FooterMargin = Application.CentimetersToPoints(0.5) '页脚 .Zoom = 100 End WithEnd Sub

Excel VBA 页面设置
© 2025 智德知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com