录制宏啊!
看看下面这段代码:Sub Macro1()
'
' Macro1 Macro
' YuanFei ¼Ç¼µÄºê 2002-4-30
''
Cells.Find(What:="3", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, MatchByte:=False, SearchFormat:=False).Activate
Range("D6").Select
ActiveCell.FormulaR1C1 = "5"
Range("D7").Select
Application.ActivePrinter = "´«Õæ ÔÚ Ne00:"
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.94488188976378)
.RightMargin = Application.InchesToPoints(1.14173228346457)
.TopMargin = Application.InchesToPoints(1.5748031496063)
.BottomMargin = Application.InchesToPoints(1.5748031496063)
.HeaderMargin = Application.InchesToPoints(0.511811023622047)
.FooterMargin = Application.InchesToPoints(0.511811023622047)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
End Sub
看看下面这段代码:Sub Macro1()
'
' Macro1 Macro
' YuanFei ¼Ç¼µÄºê 2002-4-30
''
Cells.Find(What:="3", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, MatchByte:=False, SearchFormat:=False).Activate
Range("D6").Select
ActiveCell.FormulaR1C1 = "5"
Range("D7").Select
Application.ActivePrinter = "´«Õæ ÔÚ Ne00:"
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.94488188976378)
.RightMargin = Application.InchesToPoints(1.14173228346457)
.TopMargin = Application.InchesToPoints(1.5748031496063)
.BottomMargin = Application.InchesToPoints(1.5748031496063)
.HeaderMargin = Application.InchesToPoints(0.511811023622047)
.FooterMargin = Application.InchesToPoints(0.511811023622047)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
End Sub
比如插入/删除一行一列
等等