Menu

Rabu, 25 Oktober 2017

Buat Angsuran pinjaman menurun dengan VBA Excel

Private Sub Ags_AfterUpdate()
If Ags <> "" Then
ListBox1.Clear
Call TampilList
Dim a As Integer
For a = 1 To 12
 With ListBox1
.AddItem
 .List(.ListCount - 1, 0) = a
 .List(.ListCount - 1, 1) = Format(WorksheetFunction.EDate(Now(), (a)), "mmmm yyyy;@")
 .List(.ListCount - 1, 2) = "Rp." & Format(Ags - ((Ags / 12) * (a - 1)), "###,###")
 .List(.ListCount - 1, 3) = "Rp." & Format((Ags - ((Ags / 12) * (a - 1))) * (5 / 100), "###,###")
 .List(.ListCount - 1, 4) = "Rp." & Format(Ags / 12, "###,###")
 .List(.ListCount - 1, 5) = "Rp." & Format(Ags / 12 + (Ags - ((Ags / 12) * (a - 1))) * (5 / 100), "###,###")
 .List(.ListCount - 1, 6) = "Rp." & Format(Ags - ((Ags / 12) * a), "###,###")
  End With
 Next a
 Ags.Value = Format(Ags.Value, "###,###")
 End If
End Sub
Sub TampilList()
With ListBox1
.AddItem
.List(.ListCount - 1, 0) = "Ags." ' Kolom pertama
.List(.ListCount - 1, 1) = "Tanggal" 'Kolom kedua dan seterusnya
.List(.ListCount - 1, 2) = "Saldo"
.List(.ListCount - 1, 3) = "Jasa"
.List(.ListCount - 1, 4) = "Pokok"
.List(.ListCount - 1, 5) = "Jumlah"
.List(.ListCount - 1, 6) = "Saldo"
End With
End Sub
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
On Error Resume Next
If ListBox1.ListIndex > 0 Then
ListBox1.RemoveItem (ListBox1.ListIndex)
End If
End Sub
Private Sub KELUAR_Click()
TRANSAKSI.TxtPINJ = Format(ANGSURAN.Ags * 1, "#,##0")
Unload Me
End Sub
Private Sub Label36_Click()
ListBox1.Clear
Ags.Value = ""
End Sub

Kamis, 12 Oktober 2017

YANG AKU TAKUT



https://static.xx.fbcdn.net/images/emoji.php/v9/fd/1/16/1f940.png🥀https://static.xx.fbcdn.net/images/emoji.php/v9/f1a/1/16/1f33b.png🌻 *YANG AKU TAKUT...*https://static.xx.fbcdn.net/images/emoji.php/v9/f1a/1/16/1f33b.png🌻https://static.xx.fbcdn.net/images/emoji.php/v9/fd/1/16/1f940.png🥀
*_Yang aku takut_*
hatiku kian mengeras dan susah menerima nasihat, namun
*sangat pandai menasihati*.
*_Yang aku takut_*
aku merasa paling benar sehingga
*merendahkan yang lain*.
*_Yang aku takut_*
egoku terlalu tinggi hingga
*merasa paling baik di antara yang lain*.
*_Yang aku takut_*
aku lupa bercermin, namun
*sibuk berprasangka buruk kepada yang lain*.
*_Yang aku takut_*
ilmuku akan membuatku
*menjadi sombong, memandang rendah yang berbeda denganku*.
*_Yang aku takut_*
lidahku makin lincah membicarakan aib saudaraku, namun
*_lupa dengan aibku_*
*_yang menggunung dan tak sanggup kubenahi_*.
*_Yang aku takut_*
aku hanya hebat dalam berkata, namun
*_buruk dalam bertindak_*
*_Yang aku takut_*
aku hanya pintar dalam berdakwah, namun
*_susah untuk mentaati_*
*_Yang aku takut_*
aku hanya cerdas dalam mengkritik,  namun
*_lemah dalam mengintrospeksi diri sendiri_*
*_Yang aku takut_*
aku membenci dosa orang lain namun
*_saat aku sendiri berbuat dosa, aku enggan membencinya_*.
*_Ya Allah ya Rabb* ...
*aku berlindung padaMu*
*dari kelemahanku sendiri*
*Lembutkanlah hatiku*
*dan redam egoku*
*Jauhkan aku*
*dari sifat berbangga diri*,
*hasad*,
*iri dan dengki*.
_*Yaa Allah, yaa Robbi*_
*Sungguh*
*_aku memohon hidayah_*
*_dan ampunanMu_*
*Aamiin Yaa Rabbal 'Aalamiin*....

Selasa, 03 Oktober 2017

Angka ke terbilang vba excel

Private Sub CommandButton2_Click()
Dim i As Integer, a As Integer, MyNumber As Integer
For i = 7 To 50
Dim myarray(9) As String
        myarray(0) = " Zero "
        myarray(1) = "One"
        myarray(2) = "Two"
        myarray(3) = "Three"
        myarray(4) = "Four"
        myarray(5) = "Five"
        myarray(6) = "Six"
        myarray(7) = "Seven"
        myarray(8) = "Eight"
        myarray(9) = "Nine"
For a = 1 To Len(Range("B" & i).Value)
tmp = myarray(Mid(Range("B" & i), a, 1))
Range("C" & i) = Range("C" & i) & " " & tmp
Next a
        Next i
End Sub


UserFormya :Private Sub TextBox1_Change()
If TextBox1 <> "" Then
TextBox2 = Len(TextBox1)
Dim myarray(9) As String
        myarray(0) = " Zero "
        myarray(1) = "One"
        myarray(2) = "Two"
        myarray(3) = "Three"
        myarray(4) = "Four"
        myarray(5) = "Five"
        myarray(6) = "Six"
        myarray(7) = "Seven"
        myarray(8) = "Eight"
        myarray(9) = "Nine"
  Dim i As Integer, tmp As String
For i = 1 To Len(TextBox1)
tmp = tmp & " " & myarray(Mid(TextBox1, i, 1))
Next
  TextBox3 = tmp
          End If
End Sub