文档详情

I如何用VBA获取当前页页码.docx

发布:2017-01-10约1.19万字共19页下载文档
文本预览下载声明
如何用VBA获取当前页页码x = executeexcel4macro(get.document(50))achart.chart.seriescollection[1].name:=坐标轴申明;b.页脚:excelapplication1.activesheet.range[ b3:d4 ].borders[2].weight := 3;beginexcelapplication1.activesheet.columns[1].columnswi dth := 5;dim numpage as integer10) 配置指定行的高度(单位:磅)(1磅=0.035厘米),以第二举动例:next hpbon error resume nextexcelapp.workbooks.open( c:\excel\do.xls );msgbox 今朝存储格在第 numpage 页excelapp := createoleobject( excel.application );end if8)给二维图加左标申明numpage = numpage + vpcachart.chart.axes(xlcategory, xlprimary).axistitle.characters.text := 下标申明;16) 插进去一行或者一列:excelapplication1.activesheet.rows[1].font.underli ne := true;excelapplication1.worksheets[2].activate; 或者excelapp.activeworkbook.saved := true;e.顶边距2cm:j.页面铅直居中:activewindow.view = xlpagebreakpreviewif vpb.location.column activecell.column then exit for25) 封闭事情簿:excelapplication1.activesheet.printpreview;achart.chart.axes(xlvalue, xlsecondary).hastitle := true;11)给二维图坐标轴加之申明excelapplication1.worksheets[1].rows[8].pagebreak := 1;elsec.从a1位置起头粘附:或者if activesheet.pagesetup.order = xldownthenover then14) 断根熬头行第四列单位格公式:f.底边距2cm:在form中别离放入excelapplication, excelworkbook以及excelworksheet if executeexcel4macro(get.document(50)) = 0 thensub 逆页序打印()用vba本人只懂患上总页码儿的要领,时下页码儿就难倒我了,还请vba妙手指头教(三) 施用delphello 节制excle二维图executeexcel4macro (print(2, 2 * j , 2 * j ,1,,,,,,,,2,,,true,,false))i.页面程度居中:achart.chart.charttitle.characters.text:=’ excle二维图’next vpb13) 指定边框线宽度:vb以及vba常识2010-09-14 17:57:46阅览11品题0字号:大中小 定阅 =if(iserror(match(row(),get.document(64),1)),1,mat ch(row(),get.document(64),1)+1) =if(isna(match(column(),get.document(65))),1,match (column(),get.document(65))+1)achart.chart.plotarea.width := 223;12) 在第8列以前删去分页符:msgbox 请将打印纸逆向装入打印机中, vbokonly, 打印另外一壁=第if(横当页=1,纵当页,横当页+纵当页)页/共总页页要领一,用vbafor each vpb in activesheet.vpagebreaksachart:=asheet1.chartobjects.add(100,100,200,200);next i11) 在第8行以前插进去分页符:excelapplication1.saveas( c:\excel\do1.xls );g.左面距2cm:end functionexcelapplication1.activesheet.printpreview;3) 新增
显示全部
相似文档