已閱讀5頁,還剩15頁未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
項(xiàng)目三 分類賬管理系統(tǒng)的建立,學(xué)習(xí)目標(biāo) 了解會(huì)計(jì)賬簿有關(guān)基本概念 了解宏的編制 學(xué)會(huì)用宏建立分類賬,工作思路,會(huì)計(jì)賬簿概述,會(huì)計(jì)賬簿的意義與作用 會(huì)計(jì)賬簿是指以會(huì)計(jì)憑證為依據(jù),在具有專門格式的賬頁中全面、連續(xù)、系統(tǒng)、綜合地記錄經(jīng)濟(jì)業(yè)務(wù)的簿籍。,會(huì)計(jì)賬簿概述,會(huì)計(jì)賬簿的類型 1. 日記賬簿 2. 分類賬簿 3. 備查賬簿,工作任務(wù)一 總分類賬的建立,設(shè)置總分類賬格式 總分類賬,利用宏填充科目,ListBox1.Clear Dim Sheet1 As Worksheet Set Sheet1 = Worksheets(“總賬科目期初余額表“) Dim MaxLineNo1 As Integer MaxLineNo1 = Sheet1.UsedRange.Item(Sheet1.UsedRange.Count).Row Dim BeginLineNo1 As Integer BeginLineNo1 = 4 Dim Sheet2 As Worksheet Set Sheet2 = Worksheets(“會(huì)計(jì)憑證表“) Dim MaxLineNo2 As Integer MaxLineNo2 = Sheet2.UsedRange.Item(Sheet2.UsedRange.Count).Row,Dim BeginLineNo2 As Integer BeginLineNo2 = 4 Dim Code As String Dim LineNo1, LineNo2 As Integer For LineNo1 = BeginLineNo1 To MaxLineNo1 Code = Sheet1.Cells(LineNo1, 1).Value For LineNo2 = BeginLineNo2 To MaxLineNo2 If Code = Sheet2.Cells(LineNo2, 7).Value Then,ListBox1.AddItem , ListBox1.ListCount ListBox1.List(ListBox1.ListCount - 1, 0) = Code ListBox1.List(ListBox1.ListCount - 1, 1) = Sheet1.Cells(LineNo1, 2).Value Exit For End If Next Next,利用宏自動(dòng)生成總分類賬,Dim Sheet0 As Worksheet Set Sheet0 = Worksheets(“總分類賬“) Dim LineNo0 As Integer LineNo0 = 6 Dim Sheet1 As Worksheet Set Sheet1 = Worksheets(“會(huì)計(jì)憑證表“) Dim MaxLineNo1, LineNo1, BeginLineNo1 As Integer BeginLineNo1 = 4 MaxLineNo1 = Sheet2.UsedRange.Item(Sheet2.UsedRange.Count).Row,Dim Code As Integer 科目代號(hào) Code = ListBox1.List(ListBox1.ListIndex, 0) Sheet0.Cells(3, 6).Value = ListBox1.List(ListBox1.ListIndex, 1) Sheet0.Cells(5, 7).Value = “=VLOOKUP(“ & Code & “,總賬科目期初余額表!A4:D94,3,TRUE)“ Sheet0.Cells(5, 8).Value = “=VLOOKUP(“ & Code & “,總賬科目期初余額表!A4:D94,4,TRUE)“ Sheet0.Cells(5, 9).Value = “=g5-h5“ 定義變量 Dim 余額 As Double Dim 月 As Integer Dim 日 As Integer Dim 當(dāng)日借方合計(jì) As Double Dim 當(dāng)日貸方合計(jì) As Double Dim 當(dāng)月貸方合計(jì) As Double Dim 當(dāng)月借方合計(jì) As Double Dim 當(dāng)年貸方合計(jì) As Double Dim 當(dāng)年借方合計(jì) As Double,Dim 標(biāo)志 As Boolean 余額 = Sheet0.Cells(5, 9).Value 月 = 0 日 = 0 當(dāng)日借方合計(jì) = 0 當(dāng)日貸方合計(jì) = 0 當(dāng)月借方合計(jì) = 0 當(dāng)月貸方合計(jì) = 0 當(dāng)年借方合計(jì) = 0 當(dāng)年貸方合計(jì) = 0 標(biāo)志 = False 刪除上次自動(dòng)生成的數(shù)據(jù) Sheet0.Range(Cells(LineNo0, 1), Cells(10000, 100).Delete 輸出總分類賬數(shù)據(jù) For LineNo1 = BeginLineNo1 To MaxLineNo1,If Sheet1.Cells(LineNo1, 7).Value * 1 = Code Then 如果科目代碼相符 標(biāo)志 = True 給標(biāo)志賦“真”值 If 日 = 0 Then 如果是第一次 月 = Sheet1.Cells(LineNo1, 3).Value 日 = Sheet1.Cells(LineNo1, 4).Value End If If 月 Sheet1.Cells(LineNo1, 3).Value Or 日 Sheet1.Cells(LineNo1, 4).Value Then 如果日期變化 余額 = 余額 + 當(dāng)日借方合計(jì) - 當(dāng)日貸方合計(jì) Sheet0.Cells(LineNo0, 4).Value = 月 Sheet0.Cells(LineNo0, 5).Value = 日 Sheet0.Cells(LineNo0, 7).Value = 當(dāng)日借方合計(jì) Sheet0.Cells(LineNo0, 8).Value = 當(dāng)日貸方合計(jì) Sheet0.Cells(LineNo0, 9).Value = 余額 LineNo0 = LineNo0 + 1 當(dāng)日借方合計(jì) = 0 當(dāng)日貸方合計(jì) = 0 日 = Sheet1.Cells(LineNo1, 4).Value End If,If 月 Sheet1.Cells(LineNo1, 3).Value Then 如果月份變化 Sheet0.Cells(LineNo0, 6).Value = “本月累計(jì)“ Sheet0.Cells(LineNo0, 7).Value = 當(dāng)月借方合計(jì) Sheet0.Cells(LineNo0, 8).Value = 當(dāng)月貸方合計(jì) Sheet0.Cells(LineNo0, 9).Value = 余額 LineNo0 = LineNo0 + 1 當(dāng)月借方合計(jì) = 0 當(dāng)月貸方合計(jì) = 0 月 = Cells(LineNo1, 3).Value End If 當(dāng)日借方合計(jì) = 當(dāng)日借方合計(jì) + Sheet1.Cells(LineNo1, 11) 當(dāng)日貸方合計(jì) = 當(dāng)日貸方合計(jì) + Sheet1.Cells(LineNo1, 12) 當(dāng)月借方合計(jì) = 當(dāng)月借方合計(jì) + Sheet1.Cells(LineNo1, 11) 當(dāng)月貸方合計(jì) = 當(dāng)月貸方合計(jì) + Sheet1.Cells(LineNo1, 12) 當(dāng)年借方合計(jì) = 當(dāng)年借方合計(jì) + Sheet1.Cells(LineNo1, 11) 當(dāng)年貸方合計(jì) = 當(dāng)年貸方合計(jì) + Sheet1.Cells(LineNo1, 12) End If Next,If 標(biāo)志 = True Then 如果有數(shù)據(jù),則把最后的數(shù)據(jù)輸出到相應(yīng)的單元格 余額 = 余額 + 當(dāng)日借方合計(jì) - 當(dāng)日貸方合計(jì) Sheet0.Cells(LineNo0, 4).Value = 月 Sheet0.Cells(LineNo0, 5).Value = 日 Sheet0.Cells(LineNo0, 7).Value = 當(dāng)日借方合計(jì) Sheet0.Cells(LineNo0, 8).Value = 當(dāng)日貸方合計(jì) Sheet0.Cells(LineNo0, 9).Value = 余額 LineNo0 = LineNo0 + 1 Sheet0.Cells(LineNo0, 6).Value = “本月累計(jì)“ Sheet0.Cells(LineNo0, 7).Value = 當(dāng)月借方合計(jì) Sheet0.Cells(LineNo0, 8).Value = 當(dāng)月貸方合計(jì) Sheet0.Cells(LineNo0, 9).Value = 余額 LineNo0 = LineNo0 + 1 Sheet0.Cells(LineNo0, 6).Value = “本年累計(jì)“ Sheet0.Cells(LineNo0, 7).Value = 當(dāng)年借方合計(jì) Sheet0.Cells(LineNo0, 8).Value = 當(dāng)年貸方合計(jì) Sheet0.Cells(LineNo0, 9).Value = 余額 End If,設(shè)置邊框 Sheet0.Select Range(“D4:I“ & LineNo0).Select Selection.Borders(xlDiagonalDown).LineStyle = xlNone Selection.Borders(xlDiagonalUp).LineStyle = xlNone With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic,End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlInsideVertical) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With With Selection.Borders(xlInsideHorizontal) .LineStyle = xlContinuous .Weight = xlThin .ColorIndex = xlAutomatic End With 設(shè)置數(shù)據(jù)格式 Range(“G5:I“ & LineNo0).Select Selection.NumberFormatLocal = “#,#0.00_ “,工作任務(wù)二 明細(xì)分類賬的建立,格式設(shè)置與總分類賬類似,自動(dòng)生成明細(xì)科目列表,Dim Code As Integer Dim Sheet As Worksheet Set Sheet = Worksheets(“會(huì)計(jì)憑證表“) Dim LineNo, BeginLineNo, MaxLineNo As Integer BeginLineNo = 4 MaxLineNo = Sheet2.UsedRange.Item(Sheet2.UsedRange.Count).Row Code = ListBox1.List(ListBox1.ListIndex, 0) ListBox2.Clear For LineNo = BeginLineNo To MaxLineNo,當(dāng)前明細(xì)科目 = Sheet.Cells(Li
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 媒體傳播供電協(xié)議模板
- 證券公司授權(quán)管理規(guī)范
- 體育館建設(shè)施工合同進(jìn)度表
- 公路橋梁爆破作業(yè)合同模板
- 商業(yè)活動(dòng)臨時(shí)房搭建合同
- 交通運(yùn)輸行政經(jīng)理合同
- 飼料行業(yè)財(cái)政票據(jù)管理要點(diǎn)
- 2023北京朝陽高一(上)期末政治(教師版)
- 2024年04月北京國家開發(fā)銀行北京分行春季實(shí)習(xí)生招考筆試歷年參考題庫附帶答案詳解
- 2024年04月北京交通銀行信用卡中心北京分中心校園招考筆試歷年參考題庫附帶答案詳解
- 道路、橋梁、隧道、地鐵施工標(biāo)準(zhǔn)化手冊(cè)(專業(yè)篇)
- 住宅小區(qū)室外道路及管網(wǎng)配套工程施工方案
- 公共事業(yè)管理概論(婁成武版)各章知識(shí)點(diǎn)歸納
- 風(fēng)電分部工程驗(yàn)收簽證表地基與基礎(chǔ)008
- 機(jī)電設(shè)備安裝作業(yè)指導(dǎo)書
- 申克轉(zhuǎn)子秤安裝圖片指引ppt課件
- 山東昌樂二中“271高效課堂”教學(xué)模式
- 工程竣工保修期滿移交書
- 高等數(shù)學(xué)同濟(jì)大學(xué)第7版 課后習(xí)題答案解析完整版
- 單模光纜檢驗(yàn)報(bào)告
- 化工原理課程設(shè)計(jì)甲醇和水
評(píng)論
0/150
提交評(píng)論