ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 效率神器,一键搞定繁琐工作
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
让更多数据处理,一键完成 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
楼主: zbs112

[原创] [会计精品]用EXCEL+ACCESS做的凭证报表处理系统

  [复制链接]

TA的精华主题

TA的得分主题

发表于 2007-9-22 18:22 | 显示全部楼层
<p>打不开啊,按电脑的年+月+日作为密码打不开呢</p><p></p>

TA的精华主题

TA的得分主题

发表于 2007-9-22 21:14 | 显示全部楼层
很不错,希望楼主把开发的另外一个会计小软件(记帐凭证汇总表)公布出来让我们共同学习.

TA的精华主题

TA的得分主题

 楼主| 发表于 2007-9-26 16:07 | 显示全部楼层
<p><br/>Private Sub CommandButton1_Click()<br/>&nbsp; On Error Resume Next<br/>&nbsp; Application.ScreenUpdating = False<br/>&nbsp; With Sheets("财务分析表")<br/>&nbsp;&nbsp;&nbsp;&nbsp; Call 清空表格数据<br/>&nbsp;&nbsp;&nbsp;&nbsp; If ComboBox1 = "" Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox "点击借方(贷方)汇总、年度", vbInformation, "凭证处理系统"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call 清空表格数据: Exit Sub<br/>&nbsp;&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp;&nbsp; SQL = "Select * From 科目表"<br/>&nbsp;&nbsp;&nbsp;&nbsp; If ComboBox3 = "" Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SQL = SQL &amp; " Order by 科目编码"<br/>&nbsp;&nbsp;&nbsp;&nbsp; Else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SQL = SQL &amp; " Where 类型='" &amp; ComboBox3.Text &amp; "' Order by 科目编码"<br/>&nbsp;&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp;&nbsp; RST1.Open SQL, CNN, adOpenKeyset, adLockOptimistic<br/>&nbsp;&nbsp;&nbsp;&nbsp; If RST1.EOF Or RST1.BOF Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox "没有发现" &amp; ComboBox3.Text &amp; "类的会计科目!", vbInformation, "凭证处理系统"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call 清空表格数据: RST1.Close: Set RST1 = Nothing: Exit Sub<br/>&nbsp;&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp;&nbsp; Cells(2, "B") = ComboBox1.Text &amp; "年度" &amp; ComboBox3.Text &amp; "科目分月汇总表"<br/>&nbsp;&nbsp;&nbsp;&nbsp; ProgressBar1.Max = RST1.RecordCount '进度条的最大值<br/>&nbsp;&nbsp;&nbsp;&nbsp; For I = 1 To RST1.RecordCount<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MaxRow = Range("B65536").End(xlUp).Row + 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ProgressBar1.Value = I&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '进度条的动态值<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow, "B") = RST1.Fields("科目编码")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow, "C") = RST1.Fields("总账科目")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow, "D") = RST1.Fields("明细科目")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow, "S") = RST1.Fields("现金编码")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If OptionButton1.Value = True Then Cells(MaxRow, "E") = "借"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If OptionButton2.Value = True Then Cells(MaxRow, "E") = "贷"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If OptionButton3.Value = True Then Cells(MaxRow, "E") = "※"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If OptionButton4.Value = True Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow, "E") = "借"&nbsp;&nbsp; '科目方向填充<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow + 1, "B") = RST1.Fields("科目编码")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow + 1, "C") = RST1.Fields("总账科目")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow + 1, "D") = RST1.Fields("明细科目")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow + 1, "E") = "贷" '科目方向填充<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow + 1, "S") = RST1.Fields("现金编码")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For Months = 1 To CInt(ComboBox2.Text) '科目逐月汇总<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Call MonthCount&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '逐月汇总模块<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next Months<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RST1.MoveNext<br/>&nbsp;&nbsp;&nbsp;&nbsp; Next I<br/>&nbsp;&nbsp;&nbsp;&nbsp; RST1.Close: Set RST1 = Nothing<br/>&nbsp;&nbsp;&nbsp;&nbsp; Range("R4:R" &amp; MaxRow + 1).Formula = "=SUM(F4:Q4)"<br/>&nbsp;&nbsp;&nbsp;&nbsp; Range("F4:R" &amp; MaxRow + 1).NumberFormatLocal = "#,##0.00"<br/>&nbsp;&nbsp;&nbsp;&nbsp; Call 字体线框4<br/>&nbsp;&nbsp;&nbsp;&nbsp; If OptionButton4.Value = True Then Call 月份汇总数据<br/>&nbsp; End With<br/>&nbsp; Unload Me<br/>&nbsp; Application.ScreenUpdating = True<br/>End Sub</p><p></p><p>Sub MonthCount()<br/>&nbsp;&nbsp; On Error Resume Next<br/>&nbsp;&nbsp; Dim JFHJ As Double, DFHJ As Double, JDCY As Double<br/>&nbsp;&nbsp; SQL = "Select sum(借方金额) as 借方合计,sum(贷方金额) as 贷方合计 From 分录表 "<br/>&nbsp;&nbsp; SQL = SQL &amp; " Where 年=" &amp; CInt(ComboBox1.Text) &amp; ""<br/>&nbsp;&nbsp; SQL = SQL &amp; " And 月=" &amp; Months &amp; ""<br/>&nbsp;&nbsp; SQL = SQL &amp; " And 科目编码='" &amp; Trim(Cells(MaxRow, "B")) &amp; "'"<br/>&nbsp;&nbsp; RST2.Open SQL, CNN, adOpenKeyset, adLockOptimistic<br/>&nbsp;&nbsp; JFHJ = RST2.Fields("借方合计")<br/>&nbsp;&nbsp; DFHJ = RST2.Fields("贷方合计")<br/>&nbsp;&nbsp; If OptionButton1.Value = True Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow, Months + 5) = JFHJ&nbsp; '借方<br/>&nbsp;&nbsp; End If<br/>&nbsp;&nbsp; If OptionButton2.Value = True Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow, Months + 5) = DFHJ&nbsp; '贷方<br/>&nbsp;&nbsp; End If<br/>&nbsp;&nbsp; If OptionButton3.Value = True Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select Case RST1.Fields("方向")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case "借"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; JDCY = JFHJ - DFHJ<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Case "贷"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; JDCY = DFHJ - JFHJ<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End Select<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow, Months + 5) = JDCY&nbsp; '借贷差额<br/>&nbsp;&nbsp; End If<br/>&nbsp;&nbsp; If OptionButton4.Value = True Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow, Months + 5) = JFHJ&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '借方<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cells(MaxRow + 1, Months + 5) = DFHJ&nbsp; '贷方<br/>&nbsp;&nbsp; End If<br/>&nbsp;&nbsp; JFHJ = 0: DFHJ = 0: JDCY = 0<br/>&nbsp;&nbsp; RST2.Close: Set RST2 = Nothing<br/>End Sub</p>
[此贴子已经被作者于2007-9-26 16:08:26编辑过]

TA的精华主题

TA的得分主题

发表于 2007-9-26 19:57 | 显示全部楼层
<strong>zbs112,你好!我看到你楼上的代码了,好象应该是关于“记帐凭证汇总表”的代码,但我不知道工作表以及数据库的结构,能否发一份完整的给我。谢谢!我用了一下,你的这个系统非常好用,我也试用了论坛上其他人的帐务系统,感觉你这个最棒,技术最先进,利用了sql,速度最快!</strong>

TA的精华主题

TA的得分主题

发表于 2007-9-27 12:40 | 显示全部楼层
系统做的不错,可惜与EH里其他会计系统一样,只能支持二级科目,财务上能满足,实际工作中管理要求经常需要到四级科目,另外货币能加入外币多好.

TA的精华主题

TA的得分主题

发表于 2007-10-7 18:06 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
此财务系统我用几个月,感觉很不错,作者辛苦了.谢谢分享!

TA的精华主题

TA的得分主题

发表于 2007-10-9 18:06 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助
真是太牛了,,,佩服啊!<br/>真是太牛了,,,佩服啊!<br/>[em05]

TA的精华主题

TA的得分主题

发表于 2007-10-10 12:58 | 显示全部楼层

TA的精华主题

TA的得分主题

发表于 2007-10-11 14:32 | 显示全部楼层
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用  · 内置多项VBA编程加强工具       ★ 免费下载 ★      ★使用手册
zbs112真是太伟大了,这是我见过用EXCEL做的最精品的账务处理系统

TA的精华主题

TA的得分主题

发表于 2007-10-11 17:00 | 显示全部楼层
您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-11-24 00:17 , Processed in 0.042453 second(s), 5 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表