'Ups image is failed to post
sory for the inconvinience'
or you can dowlnload the full apps build on VB apllication here by Ziddu
Download here
information About the interface:
1. Cb.Text
2. Pr.Text
3. Cb1.Text
4. Pr1.Text
5. Total1.Text
6. Cb2.Text
7. Pr2.Text
8. Total2.Text
9. Cb3.Text
10. Pr3Text
11. Total3.text
12. Command Tabulasi
13. Command Interaksi
14. Command ulang
15. Command keluar
16. Label _z
17. Labelx1
18. Labelx2
19. Label_s1
20. Label_s2
21. Label_s3
22. Label_nk
23. Labelz
24. z1.text
25. x1A.text
26. x2A.text
27. s1A.text
28. s2A.text
29. s3A.text
30. nk1.text
31. labelS1
32. z2.text
33. x1B.text
34. x2B.text
35. s1B.teeext
36. s2B.text
37. s3B.text
38. nk2.text
39. labelS2
40. z3.text
41. x1C.text
42. x2C.text
43. s1C.text
44. s2C.text
45. s3C.text
46. nk3.text
47. labelS3
48. z4.text
49. x1D.text
50. x2D.text
51. s1D.teeext
52. s2D.text
53. s3D.text
54. nk4.text
55. hslcb.text
56. hslpr.text
57. hasilkk.text
58. hasilpivot.text
59. text1.text
60. text2.text
61. text3.text
62. text4.text
63. text5.text
64. text6.text
65. text7.text
Here are the Coding , have try on it
Private Sub interaksi_Click()
On Error GoTo SALAH
'mencari kolom kerja'
'kk1 sampe kk4 sebagai kolom kerja'
If Int(X1A) < kk1 =" X1A"
kk2 =" X1B"
kk3 =" X1C"
kk4 =" X1D"
caption = "CB"
vganti_bp = "CB"
text = "X1"
kk1 =" X2A"
kk2 =" X2B"
kk3 =" X2C"
kk4 =" X2D"
caption = "PR"
vganti_bp = "PR"
text = "X2"
kk2 =" 0"
a =" 0"
a =" NK2"
kk3 =" 0"
b =" 0"
b =" NK3"
kk4 =" 0"
c =" 0"
c =" NK4"> c Then
'
'tak mungkin'
'mencari nilai terkecil dari perbandingan'
'nilai terkecil jadi baris pivot'
'baris pivot baru= baris pivot lama / perpotongan baris pivot dan kolom kerja'
' x=nilai terkecil dari hasil perbandingan'
'P,Q,R,S,T,U,V sebagai hasil dari perhitungan baris pivot baru'
'F sebagai variabel perpotongan baris pivot dan kolom kerja'
'nilai baru= nilai lama-(baris pivot*kolom kerja)'
If A < x =" A"
f =" KK2"
p =" Z2"
q =" X1B"
r =" X2B"
s =" S1B"
t =" S2B"
u =" S3B"
v =" NK2"
text =" P"
text =" Q"
text =" R"
text =" S"
text =" T"
text =" U"
text =" V"
text =" Z1"
text =" X1A"
text =" X2A"
text =" S1A"
text =" S2A"
text =" S3A"
text =" NK1"
text =" Z1"
text =" X1C"
text =" X2C"
text =" S1C"
text =" S2C"
text =" S3C"
text =" NK3"
text =" Z4"
text =" X1D"
text =" X2D"
text =" S1D"
text =" S2D"
text =" S3D"
text =" NK4"
caption =" VGANTI_BP"
text = "S1" a =" c"> C And A > C Then
X = C
F = KK4
'MENCARI BARIS PIVOT
P = Z4 / F
Q = X1D / F
R = X2D / F
S = S1D / F
T = S2D / F
U = S3D / F
V = NK4 / F
'MENCARI NILAI BARU
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NK1 - (kk1 * V)
Z2.Text = Z2 - (KK2 * P)
X1B.Text = X1B - (KK2 * Q)
X2B.Text = X2B - (KK2 * R)
S1B.Text = S1B - (KK2 * S)
S2B.Text = S2B - (KK2 * T)
S3B.Text = S3B - (KK2 * U)
NK2.Text = NK2 - (KK2 * V)
Z3.Text = Z1 - (KK3 * P)
X1C.Text = X1C - (KK3 * Q)
X2C.Text = X2C - (KK3 * R)
S1C.Text = S1C - (KK3 * S)
S2C.Text = S2C - (KK3 * T)
S3C.Text = S3C - (KK3 * U)
NK3.Text = NK3 - (KK3 * V)
Z4.Text = P
X1D.Text = Q
X2D.Text = R
S1D.Text = S
S2D.Text = T
S3D.Text = U
NK4.Text = V
LABELS3.Caption = VGANTI_BP
hasilpivot.Text = "S3"
ElseIf A <> C And A < x =" A"
f =" KK2"
p =" Z2"
q =" X1B"
r =" X2B"
s =" S1B"
t =" S2B"
u =" S3B"
v =" NK2"
text =" P"
text =" Q"
text =" R"
text =" S"
text =" T"
text =" U"
text =" V"
text =" Z1"
text =" X1A"
text =" X2A"
text =" S1A"
text =" S2A"
text =" S3A"
text =" NK1"
text =" Z1"
text =" X1C"
text =" X2C"
text =" S1C"
text =" S2C"
text =" S3C"
text =" NK3"
text =" Z4"
text =" X1D"
text =" X2D"
text =" S1D"
text =" S2D"
text =" S3D"
text =" NK4"
caption =" VGANTI_BP"
text = "S1"> c And a = c Then'
'tak mungkin'
'ElseIf a < b =" c"> c Then
'tak mungkin'
ElseIf A < b =" C"
x =" A"
f =" KK2"
p =" Z2"
q =" X1B"
r =" X2B"
s =" S1B"
t =" S2B"
u =" S3B"
v =" NK2"
text =" P"
text =" Q"
text =" R"
text =" S"
text =" T"
text =" U"
text =" V"
text =" Z1"
text =" X1A"
text =" X2A"
text =" S1A"
text =" S2A"
text =" S3A"
text =" NK1"
text =" Z1"
text =" X1C"
text =" X2C"
text =" S1C"
text =" S2C"
text =" S3C"
text =" NK3"
text =" Z4"
text =" X1D"
text =" X2D"
text =" S1D"
text =" S2D"
text =" S3D"
text =" NK4"
caption =" VGANTI_BP"
text = "S1"
b =" c"
a =" c"> B And B <> C Then
X = B
F = KK3
'MENCARI BARIS PIVOT
P = Z3 / F
Q = X1C / F
R = X2C / F
S = S1C / F
T = S2C / F
U = S3C / F
V = NK3 / F
Z3.Text = P
X1C.Text = Q
X2C.Text = R
S1C.Text = S
S2C.Text = T
S3C.Text = U
NK3.Text = V
'MENCARI NILAI BARU
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NK1 - (kk1 * V)
Z2.Text = Z2 - (KK2 * P)
X1B.Text = X1B - (KK2 * Q)
X2B.Text = X2B - (KK2 * R)
S1B.Text = S1B - (KK2 * S)
S2B.Text = S2B - (KK2 * T)
S3B.Text = S3B - (KK2 * U)
NK2.Text = NK2 - (KK2 * V)
Z4.Text = Z4 - (KK4 * P)
X1D.Text = X1D - (KK4 * Q)
X2D.Text = X2D - (KK4 * R)
S1D.Text = S1D - (KK4 * S)
S2D.Text = S2D - (KK4 * T)
S3D.Text = S3D - (KK4 * U)
NK4.Text = NK4 - (KK4 * V)
LABELS2.Caption = VGANTI_BP
hasilpivot.Text = "S2"
ElseIf A > B And B < x =" B"
f =" KK3"
p =" Z3"
q =" X1C"
r =" X2C"
s =" S1C"
t =" S2C"
u =" S3C"
v =" NK3"
text =" P"
text =" Q"
text =" R"
text =" S"
text =" T"
text =" U"
text =" V"
text =" Z1"
text =" X1A"
text =" X2A"
text =" S1A"
text =" S2A"
text =" S3A"
text =" NK1"
text =" Z2"
text =" X1B"
text =" X2B"
text =" S1B"
text =" S2B"
text =" S3B"
text =" NK2"
text =" Z4"
text =" X1D"
text =" X2D"
text =" S1D"
text =" S2D"
text =" S3D"
text =" NK4"
caption =" VGANTI_BP"
text = "S2"> B And B < a =" C"
x =" B"
f =" KK3"
p =" Z3"
q =" X1C"
r =" X2C"
s =" S1C"
t =" S2C"
u =" S3C"
v =" NK3"
text =" P"
text =" Q"
text =" R"
text =" S"
text =" T"
text =" U"
text =" V"
text =" Z1"
text =" X1A"
text =" X2A"
text =" S1A"
text =" S2A"
text =" S3A"
text =" NK1"
text =" Z2"
text =" X1B"
text =" X2B"
text =" S1B"
text =" S2B"
text =" S3B"
text =" NK2"
text =" Z4"
text =" X1D"
text =" X2D"
text =" S1D"
text =" S2D"
text =" S3D"
text =" NK4"
caption =" VGANTI_BP"
text = "S2"> B And B > C And A > C Then
X = C
F = KK4
'MENCARI BARIS PIVOT
P = Z4 / F
Q = X1D / F
R = X2D / F
S = S1D / F
T = S2D / F
U = S3D / F
V = NK4 / F
Z4.Text = P
X1D.Text = Q
X2D.Text = R
S1D.Text = S
S2D.Text = T
S3D.Text = U
NK4.Text = V
'MENCARI NILAI BARU
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NK1 - (kk1 * V)
Z2.Text = Z2 - (KK2 * P)
X1B.Text = X1B - (KK2 * Q)
X2B.Text = X2B - (KK2 * R)
S1B.Text = S1B - (KK2 * S)
S2B.Text = S2B - (KK2 * T)
S3B.Text = S3B - (KK2 * U)
NK2.Text = NK2 - (KK2 * V)
Z3.Text = Z1 - (KK3 * P)
X1C.Text = X1C - (KK3 * Q)
X2C.Text = X2C - (KK3 * R)
S1C.Text = S1C - (KK3 * S)
S2C.Text = S2C - (KK3 * T)
S3C.Text = S3C - (KK3 * U)
NK3.Text = NK3 - (KK3 * V)
LABELS3.Caption = VGANTI_BP
hasilpivot.Text = "S3"
'ElseIf a > b And b > c And a <> b And b > c And a = c Then
'tak mungkin'
'ElseIf a > b And b = c And a > c Then
'tak mungkin'
'ElseIf a > b And b = c And a <> b And b = c And a = c Then
'tak mungkin'
'ElseIf a = b And b <> c Then
'tak mungkin'
'ElseIf a = b And b < a =" b" a =" c" a =" B"> C And A > C Then
X = C
F = KK4
'MENCARI BARIS PIVOT
P = Z4 / F
Q = X1D / F
R = X2D / F
S = S1D / F
T = S2D / F
U = S3D / F
V = NK4 / F
Z4.Text = P
X1D.Text = Q
X2D.Text = R
S1D.Text = S
S2D.Text = T
S3D.Text = U
NK4.Text = V
'MENCARI NILAI BARU
Z1.Text = Z1 - (kk1 * P)
X1A.Text = X1A - (kk1 * Q)
X2A.Text = X2A - (kk1 * R)
S1A.Text = S1A - (kk1 * S)
S2A.Text = S2A - (kk1 * T)
S3A.Text = S3A - (kk1 * U)
NK1.Text = NKZ2.Text = Z2 - (KK2 * P)
X1B.Text = X1B - (KK2 * Q)
X2B.Text = X2B - (KK2 * R)
S1B.Text = S1B - (KK2 * S)
S2B.Text = S2B - (KK2 * T)
S3B.Text = S3B - (KK2 * U)
NK2.Text = NK2 - (KK2 * V)
Z3.Text = Z1 - (KK3 * P)
X1C.Text = X1C - (KK3 * Q)
X2C.Text = X2C - (KK3 * R)
S1C.Text = S1C - (KK3 * S)
S2C.Text = S2C - (KK3 * T)
S3C.Text = S3C - (KK3 * U)
NK3.Text = NK3 - (KK3 * V)
LABELS3.Caption = VGANTI_BP
hasilpivot.Text = "S3"
'ElseIf a = b And b > c And a < a =" b"> c And a = c Then
'tak mungkin'
'ElseIf a = b And b = c And a > c Then
'tak mungkin'
'ElseIf a = b And b = c And a < a =" b" b =" c" a =" c">
End If
End If
Text1.Text = P
Text2.Text = Q
Text3.Text = R
Text4.Text = S
Text5.Text = T
Text6.Text = U
Text7.Text = V
If Labels1.Caption = "CB" Then
HSLCB.Text = NK2
End If
If LABELS2.Caption = "CB" Then
HSLCB.Text = NK3
End If
If LABELS3.Caption = "CB" Then
HSLCB.Text = NK4
End If
If Labels1.Caption = "PR" Then
HSLPR.Text = NK2
End If
If LABELS2.Caption = "PR" Then
HSLPR.Text = NK3
End If
If LABELS3.Caption = "PR" Then
HSLPR.Text = NK4
End If
Exit Sub
SALAH:
MsgBox "KLIK TABULASI DULU", vbInformation
End Sub
Private Sub tabulasi_Click()
On Error GoTo SALAH
Z1.Text = 1
Z2.Text = 0
Z3.Text = 0
Z4.Text = 0
X1A.Text = (CB * -1)
X1B.Text = CB1
X1C.Text = CB2
X1D.Text = CB3
X2A.Text = (PR * -1)
X2B.Text = PR1
X2C.Text = PR2
X2D.Text = PR3
S1A.Text = 0
S1B.Text = 1
S1C.Text = 0
S1D.Text = 0
S2A.Text = 0
S2B.Text = 0
S2C.Text = 1
S2D.Text = 0
S3A.Text = 0
S3B.Text = 0
S3C.Text = 0
S3D.Text = 1
NK1.Text = 0
NK2.Text = TOTAL1
NK3.Text = TOTAL2
NK4.Text = TOTAL3
Exit Sub
SALAH:
MsgBox "ISI DULU YANG KOSONG", vbInformation
CB.SetFocus
End Sub
Private Sub KELUAR_Click()
Dim KELUAR As String
Dim PESAN As String
PESAN = MsgBox("APAKAH YAKIN AKAN KELUAR?", vbOKCancel + vbQuestion, "PASTIKAN")
If PESAN = vbOK Then Unload Me
If PESAN = vbCancel Then CB.SetFocus
End Sub
Private Sub ULANG_Click()
CB.Text = ""
PR.Text = ""
CB1.Text = ""
CB2.Text = ""
CB3.Text = ""
PR1.Text = ""
PR2.Text = ""
PR3.Text = ""
TOTAL1.Text = ""
TOTAL2.Text = ""
TOTAL3.Text = ""
Z1.Text = ""
Z2.Text = ""
Z3.Text = ""
Z4.Text = ""
X1A.Text = ""
X1B.Text = ""
X1C.Text = ""
X1D.Text = ""
X2A.Text = ""
X2B.Text = ""
X2C.Text = ""
X2D.Text = ""
S1A.Text = ""
S1B.Text = ""
S1C.Text = ""
S1D.Text = ""
S2A.Text = ""
S2B.Text = ""
S2C.Text = ""
S2D.Text = ""
S3A.Text = ""
S3B.Text = ""
S3C.Text = ""
S3D.Text = ""
NK1.Text = ""
NK2.Text = ""
NK3.Text = ""
NK4.Text = ""
HSLCB.Text = ""
HSLPR.Text = ""
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
End Sub
Sabtu, 26 Juni 2010
Langganan:
Postingan (Atom)