返回首页
当前位置: 主页 > 精通Office > Excel教程 >

用Excel的宏制作打印学生收费收据保存程序

时间:2011-03-13 11:11来源:知行网www.zhixing123.cn 编辑:麦田守望者

Sub Macro1()
' Macro1 Macro
' 打印收费收据
' ActiveWindow.SelectedSheets.PrintOut Copies:=1

'保存收费收据数据
' A
Sheets("收费库").Select
Range("C4:Z4").Select
Selection.Copy
Range(["C"&(1940-COUNTBLANK(htj)+13)]).Select
ActiveSheet.Paste
' B
Sheets("注册库").Select
Range("C4:S5").Select
Selection.Copy
Range(["C"&(4000-COUNTBLANK(htjB)+17)]).Select
ActiveSheet.Paste
' Range("C15").Select
Sheets("票据打印").Select
Range("AB25").Select
' C
ActiveWorkbook.Save

End Sub
__________________________________________________

Sub Macro2()
'
' Macro2 Macro
' 注册学籍库

'["C"&(1940-COUNTBLANK(htj)+13)]
Sheets("报名注册表").Select
Range("C10:S4010").Select
Selection.ClearContents
Sheets("注册库").Select
Selection.AutoFilter Field:=2, Criteria1:=["zcbj"] '"066"
Range("C16").Select
' ActiveWindow.ScrollColumn = 2
' ActiveWindow.ScrollColumn = 3
' ActiveWindow.ScrollColumn = 4
' ActiveWindow.ScrollColumn = 5
' ActiveWindow.ScrollColumn = 6
' ActiveWindow.ScrollColumn = 7
' ActiveWindow.ScrollColumn = 8
' ActiveWindow.ScrollColumn = 9
' ActiveWindow.ScrollRow = 22
Range("C16:S39").Select
Selection.Copy
Sheets("报名注册表").Select
Range("C10").Select
ActiveSheet.Paste
Sheets("注册库").Select
Selection.AutoFilter Field:=2
Sheets("报名注册表").Select
Range("D12").Select
End Sub

------分隔线----------------------------
标签(Tag):EXCEL
------分隔线----------------------------
推荐内容
猜你感兴趣