vb 如何控制EXCEL 页眉字体和下划线
vb 如何控制EXCEL 页眉字体和下划线? 录制宏,把它改成VB代码即可,改动量非常的小 如何搞啊?楼上的有QQ吗?请教下这是录制的宏:
Sub Macro1()
'
' Macro1 Macro
' 宏由 h 录制,时间: 2012/1/12
'
'
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = "&""宋体,加粗""&20&Edjdejfeiei"
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 300
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
End Sub
你要的关键在这:
.CenterHeader = "&""宋体,加粗""&20&Edjdejfeiei"
补充:VB , 数据库(包含打印,安装,报表)