Excel VBA 页面设置
1、打开新建一个并打开EXCEL工作表


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

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:66
阅读量:68
阅读量:93
阅读量:39
阅读量:66