Cari
×

Daftarkan diri

Use your Facebook account for quick registration

OR

Create a Shvoong account from scratch

Already a Member? Masuk!
×

Masuk

Sign in using your Facebook account

OR

Not a Member? Daftarkan diri!
×

Daftarkan diri

Use your Facebook account for quick registration

OR

Masuk

Sign in using your Facebook account

Contoh Coding HTML

oleh: miftachudin    
ª
 
Private Sub Cmdreff_Click()
Dim habis As Boolean
Dim neracaawal
Dim barisneracaawal, barisjurnalumum As Long
Dim tgl
Dim keteranganjurnalumum, namarekening, koderekening As String

neracaawal = ActiveWorkbook.Names("neracasaldo").RefersToRange.Value
barisneracaawal = UBound(neracaawal, 1)
barisjurnalumum = 2
habis = False

Do Until habis
tgl = Worksheets("jurnalumum").Cells(barisjurnalumum, 1).Value
If IsDate(tgl) Then
keteranganjurnalumum = Worksheets("jurnalumum").Cells(barisjurnalumum, 2).Value & Worksheets("jurnalumum").Cells(barisjurnalumum, 3).Value
For i = 2 To barisneracaawal
namarekening = ActiveWorkbook.Names("neracasaldo").RefersToRange.Cells(i, 2).Value
If namarekening = keteranganjurnalumum Then
koderekening = ActiveWorkbook.Names("neracasaldo").RefersToRange.Cells(i, 1).Value
Exit For
End If
Next i
Worksheets("jurnalumum").Cells(barisjurnalumum, 4).Value = koderekening
Else
If Worksheets("jurnalumum").Cells(barisjurnalumum, 1).Value = "selesai" Then
habis = True
Exit Do
End If
End If
barisjurnalumum = barisjurnalumum + 1
Loop

End Sub

Private Sub cmdbb_Click()
Dim periodelalu As Date
Dim neracaawal, i, saldodebet, saldokredit
Dim barisneracaawal As Long
Dim newsheet As Worksheet
Dim sheetname As String

periodelalu = "01/01/2000"
neracaawal = ActiveWorkbook.Names("neracasaldo").RefersToRange.Value
barisneracaawal = UBound(neracaawal, 1)

For i = 2 To barisneracaawal
sheetname = ActiveWorkbook.Names("neracasaldo").RefersToRange.Cells(i, 1).Value
saldodebet = ActiveWorkbook.Names("neracasaldo").RefersToRange.Cells(i, 3).Value
saldokredit = ActiveWorkbook.Names("neracasaldo").RefersToRange.Cells(i, 4).Value

Set newsheet = Worksheets.Add
newsheet.Name = sheetname
Worksheets(newsheet.Name).Range("A1") = "tanggal"
Worksheets(newsheet.Name).Range("B1") = "keterangan"
Worksheets(newsheet.Name).Range("C1") = "debet"
Worksheets(newsheet.Name).Range("D1") = "kredit"
Worksheets(newsheet.Name).Range("E1") = "saldodebet"
Worksheets(newsheet.Name).Range("F1") = "saldokredit"

Worksheets(newsheet.Name).Range("A2") = periodelalu
Worksheets(newsheet.Name).Range("A2").NumberFormat = "dd/mmmm/yyyy"
Worksheets(newsheet.Name).Range("B2") = "saldo"
Worksheets(newsheet.Name).Range("C2") = saldodebet
Worksheets(newsheet.Name).Range("C2").NumberFormat = "_([$Rp-421]* #,##0.00_);_([$Rp-421]* (#,##0.00);_([$Rp-421]* ""-""??_);_(@_)"
Worksheets(newsheet.Name).Range("D2") = saldokredit
Worksheets(newsheet.Name).Range("D2").NumberFormat = "_([$Rp-421]* #,##0.00_);_([$Rp-421]* (#,##0.00);_([$Rp-421]* ""-""??_);_(@_)"
Worksheets(newsheet.Name).Range("E2") = saldodebet
Worksheets(newsheet.Name).Range("E2").NumberFormat = "_([$Rp-421]* #,##0.00_);_([$Rp-421]* (#,##0.00);_([$Rp-421]* ""-""??_);_(@_)"
Worksheets(newsheet.Name).Range("F2") = saldokredit
Worksheets(newsheet.Name).Range("F2").NumberFormat = "_([$Rp-421]* #,##0.00_);_([$Rp-421]* (#,##0.00);_([$Rp-421]* ""-""??_);_(@_)"
Next i

End Sub

Private Sub cmdposting_Click()
Dim habis As Boolean
Dim neracaawal, tgl
Dim barisjurnalumum As Long
Dim barisneracaawal As Long
Dim koderekening, keteranganjurnalumum As String
Dim namarekening As String
Dim sel
Dim i As Long
Dim j As Long

neracaawal = ActiveWorkbook.Names("neracasaldo").RefersToRange.Value
barisneracaawal = UBound(neracaawal, 1)
habis = False
barisjurnalumum = 2
Do Until habis
tgl = Worksheets("jurnalumum").Cells(barisjurnalumum, 1).Value
If Worksheets("jurnalumum").Cells(barisjurnalumum, 1).Value = "selesai" Then
habis = True
Exit Do
End If
barisjurnalumum = barisjurnalumum + 1
Loop

For i = 2 To barisneracaawal
namarekening = ActiveWorkbook.Names("neracasaldo").RefersToRange.Cells(i, 1).Value
Worksheets(namarekening).Activate

For j = 2 To barisjurnalumum
sel = "A" & Trim(Str(j + 1))
Worksheets(namarekening).Range(sel).Formula = "=if(jurnalumum!D" & j & "=" & namarekening & ",jurnalumum!A" & j & ","""")"
Worksheets(namarekening).Range(sel).NumberFormat = "dd/mmmm/yyyy"

sel = "B" & Trim(Str(j + 1))
Worksheets(namarekening).Range(sel).Formula = "=if(jurnalumum!D" & j & "=" & namarekening & ",jurnalumum!B" & j & " & jurnalumum!C" & j & ","""")"

sel = "C" & Trim(Str(j + 1))
Worksheets(namarekening).Range(sel).Formula = "=if(jurnalumum!D" & j & "=" & namarekening & ",jurnalumum!E" & j & ",0)"
Worksheets(namarekening).Range(sel).NumberFormat = "_([$Rp-421]* #,##0.00_);_([$Rp-421]* (#,##0.00);_([$Rp-421]* ""-""??_);_(@_)"

sel = "D" & Trim(Str(j + 1))
Worksheets(namarekening).Range(sel).Formula = "=if(jurnalumum!D" & j & "=" & namarekening & ",jurnalumum!F" & j & ",0)"
Worksheets(namarekening).Range(sel).NumberFormat = "_([$Rp-421]* #,##0.00_);_([$Rp-421]* (#,##0.00);_([$Rp-421]* ""-""??_);_(@_)"

sel = "E" & Trim(Str(j + 1))
Worksheets(namarekening).Range(sel).Formula = "=if((e" & j & "-f" & j & ")+(c" & (j + 1) & "-d" & (j + 1) & ")>=0, (e" & j & "-f" & j & ")+(c" & (j + 1) & "-d" & (j + 1) & "),0)"
Worksheets(namarekening).Range(sel).NumberFormat = "_([$Rp-421]* #,##0.00_);_([$Rp-421]* (#,##0.00);_([$Rp-421]* ""-""??_);_(@_)"

sel = "F" & Trim(Str(j + 1))
Worksheets(namarekening).Range(sel).Formula = "=if((e" & j & "-f" & j & ")+(c" & (j + 1) & "-d" & (j + 1) & ")<0, abs((e" & j & "-f" & j & ")+(c" & (j + 1) & "-d" & (j + 1) & ")),0)"
Worksheets(namarekening).Range(sel).NumberFormat = "_([$Rp-421]* #,##0.00_);_([$Rp-421]* (#,##0.00);_([$Rp-421]* ""-""??_);_(@_)"

Next j
Next i

End Sub
Private Sub cmdsblmpeny_Click()

Dim neracaawal, newsheet
Dim barisneracaawal As Long
Dim barisjurnalumum As Long
Dim habis As Boolean
Dim tgl
Dim koderekening As String
Dim saldodebet, saldokredit As Currency

neracaawal = ActiveWorkbook.Names("neracasaldo").RefersToRange.Value
barisneracaawal = UBound(neracaawal, 1)
habis = False
barisjurnalumum = 2

Do Until habis = True
If Worksheets("jurnalumum").Cells(barisjurnalumum, 1).Value = "penyesuaian" Then
habis = True
Exit Do
End If
barisjurnalumum = barisjurnalumum + 1
Loop

Set newsheet = Worksheets.Add
newsheet.Name = "neracasaldosblmpenyesuaian"
Worksheets(newsheet.Name).Activate
For i = 2 To barisneracaawal
koderekening = ActiveWorkbook.Names("neracasaldo").RefersToRange.Cells(i, 1).Value
namarekening = ActiveWorkbook.Names("neracasaldo").RefersToRange.Cells(i, 2).Value
saldodebet = Worksheets(koderekening).Cells(barisjurnalumum, 5).Value
saldokredit = Worksheets(koderekening).Cells(barisjurnalumum, 6).Value
Worksheets(newsheet.Name).Cells(i, 1).Value = koderekening
Worksheets(newsheet.Name).Cells(i, 2).Value = namarekening
Worksheets(newsheet.Name).Cells(i, 3).Value = saldodebet
Worksheets(newsheet.Name).Cells(i, 3).NumberF
Diterbitkan di: 28 September, 2010   
Mohon dinilai : 1 2 3 4 5
  1. Menjawab   Pertanyaan  :    gan ini codigan apa?????? ( 1 Jawaban ) Lihat semua
  1. Jawaban  :    coding buat laporan keuangan 14 Agustus 2011
Terjemahkan Kirim Link Cetak
X

.