




已閱讀5頁,還剩15頁未讀, 繼續(xù)免費閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
項目三 分類賬管理系統(tǒng)的建立,學(xué)習(xí)目標(biāo) 了解會計賬簿有關(guān)基本概念 了解宏的編制 學(xué)會用宏建立分類賬,工作思路,會計賬簿概述,會計賬簿的意義與作用 會計賬簿是指以會計憑證為依據(jù),在具有專門格式的賬頁中全面、連續(xù)、系統(tǒng)、綜合地記錄經(jīng)濟業(yè)務(wù)的簿籍。,會計賬簿概述,會計賬簿的類型 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(“會計憑證表“) 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,利用宏自動生成總分類賬,Dim Sheet0 As Worksheet Set Sheet0 = Worksheets(“總分類賬“) Dim LineNo0 As Integer LineNo0 = 6 Dim Sheet1 As Worksheet Set Sheet1 = Worksheets(“會計憑證表“) Dim MaxLineNo1, LineNo1, BeginLineNo1 As Integer BeginLineNo1 = 4 MaxLineNo1 = Sheet2.UsedRange.Item(Sheet2.UsedRange.Count).Row,Dim Code As Integer 科目代號 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)日借方合計 As Double Dim 當(dāng)日貸方合計 As Double Dim 當(dāng)月貸方合計 As Double Dim 當(dāng)月借方合計 As Double Dim 當(dāng)年貸方合計 As Double Dim 當(dāng)年借方合計 As Double,Dim 標(biāo)志 As Boolean 余額 = Sheet0.Cells(5, 9).Value 月 = 0 日 = 0 當(dāng)日借方合計 = 0 當(dāng)日貸方合計 = 0 當(dāng)月借方合計 = 0 當(dāng)月貸方合計 = 0 當(dāng)年借方合計 = 0 當(dāng)年貸方合計 = 0 標(biāo)志 = False 刪除上次自動生成的數(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)日借方合計 - 當(dāng)日貸方合計 Sheet0.Cells(LineNo0, 4).Value = 月 Sheet0.Cells(LineNo0, 5).Value = 日 Sheet0.Cells(LineNo0, 7).Value = 當(dāng)日借方合計 Sheet0.Cells(LineNo0, 8).Value = 當(dāng)日貸方合計 Sheet0.Cells(LineNo0, 9).Value = 余額 LineNo0 = LineNo0 + 1 當(dāng)日借方合計 = 0 當(dāng)日貸方合計 = 0 日 = Sheet1.Cells(LineNo1, 4).Value End If,If 月 Sheet1.Cells(LineNo1, 3).Value Then 如果月份變化 Sheet0.Cells(LineNo0, 6).Value = “本月累計“ Sheet0.Cells(LineNo0, 7).Value = 當(dāng)月借方合計 Sheet0.Cells(LineNo0, 8).Value = 當(dāng)月貸方合計 Sheet0.Cells(LineNo0, 9).Value = 余額 LineNo0 = LineNo0 + 1 當(dāng)月借方合計 = 0 當(dāng)月貸方合計 = 0 月 = Cells(LineNo1, 3).Value End If 當(dāng)日借方合計 = 當(dāng)日借方合計 + Sheet1.Cells(LineNo1, 11) 當(dāng)日貸方合計 = 當(dāng)日貸方合計 + Sheet1.Cells(LineNo1, 12) 當(dāng)月借方合計 = 當(dāng)月借方合計 + Sheet1.Cells(LineNo1, 11) 當(dāng)月貸方合計 = 當(dāng)月貸方合計 + Sheet1.Cells(LineNo1, 12) 當(dāng)年借方合計 = 當(dāng)年借方合計 + Sheet1.Cells(LineNo1, 11) 當(dāng)年貸方合計 = 當(dāng)年貸方合計 + Sheet1.Cells(LineNo1, 12) End If Next,If 標(biāo)志 = True Then 如果有數(shù)據(jù),則把最后的數(shù)據(jù)輸出到相應(yīng)的單元格 余額 = 余額 + 當(dāng)日借方合計 - 當(dāng)日貸方合計 Sheet0.Cells(LineNo0, 4).Value = 月 Sheet0.Cells(LineNo0, 5).Value = 日 Sheet0.Cells(LineNo0, 7).Value = 當(dāng)日借方合計 Sheet0.Cells(LineNo0, 8).Value = 當(dāng)日貸方合計 Sheet0.Cells(LineNo0, 9).Value = 余額 LineNo0 = LineNo0 + 1 Sheet0.Cells(LineNo0, 6).Value = “本月累計“ Sheet0.Cells(LineNo0, 7).Value = 當(dāng)月借方合計 Sheet0.Cells(LineNo0, 8).Value = 當(dāng)月貸方合計 Sheet0.Cells(LineNo0, 9).Value = 余額 LineNo0 = LineNo0 + 1 Sheet0.Cells(LineNo0, 6).Value = “本年累計“ Sheet0.Cells(LineNo0, 7).Value = 當(dāng)年借方合計 Sheet0.Cells(LineNo0, 8).Value = 當(dāng)年貸方合計 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ù)二 明細分類賬的建立,格式設(shè)置與總分類賬類似,自動生成明細科目列表,Dim Code As Integer Dim Sheet As Worksheet Set Sheet = Worksheets(“會計憑證表“) 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)前明細科目 = Sheet.Cells(Li
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 《數(shù)據(jù)網(wǎng)組建與維護》課件-任務(wù)2 認識網(wǎng)絡(luò)參考模型1.2.2 TCP-IP參考模型
- 校園安全常識
- 2025年大學(xué)輔導(dǎo)員招聘考試題庫-教育心理專項模擬試題
- 2025年廚師職業(yè)技能鑒定高級試卷:廚房設(shè)備管理與維護高級實操試題
- 急救藥械管理規(guī)范管理
- 2025年茶藝師職業(yè)技能競賽試卷:茶藝師茶藝館服務(wù)與客戶關(guān)系管理試題
- 2025年烘焙師職業(yè)資格考試真題卷:糕點烘焙師職業(yè)技能培訓(xùn)與考核標(biāo)準(zhǔn)
- 2025年小學(xué)英語畢業(yè)考試模擬卷(英語繪本閱讀)-動物保護意識試題
- 2025年調(diào)酒師大賽競賽試題集:實戰(zhàn)演練與技能提升的關(guān)鍵試卷
- 服裝私人定制創(chuàng)業(yè)計劃
- ABB濾油機介紹教程課件
- G大調(diào)弦樂小夜曲課件
- 電子產(chǎn)品設(shè)計生產(chǎn)工藝流程課件
- 《概率論與數(shù)理統(tǒng)計》-教學(xué)教案
- 四年級下冊信息技術(shù)課件-14.西游故事人物記演示文稿|冀教版(共17張PPT)
- DB45∕T 396-2022 膨脹土地區(qū)建筑技術(shù)規(guī)程
- 300萬噸勝利原油常減壓裝置設(shè)計
- 部編人教版五年級上冊語文閱讀理解及答案(考題)
- DB51∕T 2866-2022 公共機構(gòu)合同能源管理與服務(wù)規(guī)范
- 300MW燃煤機組A級檢修費用定額
- 湘美版小學(xué)美術(shù)五年級下冊第5課《圖畫文章》課件PPT
評論
0/150
提交評論