This document contains code for a Visual Basic program that calculates asset depreciation using the straight-line method over a specified number of years. It includes the programmer's name and student ID, as well as code comments explaining the purpose and functionality of the program. The code takes input values, calculates depreciation and accumulated depreciation for each year, and displays the output.
This document contains code for a Visual Basic program that calculates asset depreciation using the straight-line method over a specified number of years. It includes the programmer's name and student ID, as well as code comments explaining the purpose and functionality of the program. The code takes input values, calculates depreciation and accumulated depreciation for each year, and displays the output.
This document contains code for a Visual Basic program that calculates asset depreciation using the straight-line method over a specified number of years. It includes the programmer's name and student ID, as well as code comments explaining the purpose and functionality of the program. The code takes input values, calculates depreciation and accumulated depreciation for each year, and displays the output.
' Nama Projek : Tugas-3 ' Tanggal : 05-04-2023 ' Oleh : M Arif Rahman ' Ket : Penyusutan Aktiva Tetap Metode Garis Lurus '-----------------------------------------------------------------------------------'
Dim Hal, Umur, TA, Tahun As Integer
Dim HP, NS, SalAwal, Peny, AkumP, SalAkhir As Long
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Hal = Hal + 1 LblHal.Text = Str(Hal) End Sub
Private Sub BtnProses_Click(sender As Object, e As EventArgs) Handles BTNPROSES.Click
Umur = Val(TbUA.Text) : Tahun = Val(LblT.Text) : HP = Val(TbHp.Text) NS = Val(TbNS.Text) : Peny = Val(LblP.Text) : AkumP = Val(LblAP.Text) Tahun = 1 Peny = (HP - NS) / Umur AkumP = Peny + 0 SalAwal = HP - 0 SalAkhir = HP - Peny
Do While Tahun <= Umur
LBLT.Text = LBLT.Text + Str(Tahun) + vbCrLf LblP.Text = LblP.Text + Str(Peny) + vbCrLf Nama : M Arif Rahman Nim : 2005151018 Kls : AKP-6A