Friday, August 17, 2018

Input dan interior color









Input interior color
Kode Input Pastekan Kode Pada CommandButton1

Private Sub CommandButton1_Click()
Dim iRow As Long
Sheets("Sheet1").Activate
iRow = WorksheetFunction.CountA(Range("b:b")) + 5
Cells(iRow, 2).Value = TextBox1.Value
Cells(iRow, 3).Value = TextBox2.Value
Cells(iRow, 4).Value = TextBox3.Value
Cells(iRow, 5).Value = TextBox4.Value
Cells(iRow, 6).Value = TextBox5.Value

Mewarnai Interior oleh TextBox6
Cells(iRow, 2).Interior.ColorIndex = TextBox6.Value
Cells(iRow, 3).Interior.ColorIndex = TextBox6.Value
Cells(iRow, 4).Interior.ColorIndex = TextBox6.Value
Cells(iRow, 5).Interior.ColorIndex = TextBox6.Value
Cells(iRow, 6).Interior.ColorIndex = TextBox6.Value

Mewarnai tex TextBox7
Cells(iRow, 2).Font.ColorIndex = TextBox7.Value
Cells(iRow, 3).Font.ColorIndex = TextBox7.Value
Cells(iRow, 4).Font.ColorIndex = TextBox7.Value
Cells(iRow, 5).Font.ColorIndex = TextBox7.Value
Cells(iRow, 6).Font.ColorIndex = TextBox7.Value
End Sub


Mengisi nilai di TextBox6 oleh SpinButton1
Private Sub SpinButton1_Change()
TextBox6.Value = SpinButton1
End Sub
Mengisi nilai di TextBox7 oleh SpinButton2
Private Sub SpinButton2_Change()
TextBox7.Value = SpinButton2
End Sub




No comments:

Post a Comment

APLIKASI GUDANG VERSI EXCEL VBA

Aplikasi Gudang Sederhana silahkan dikembangkan kritik dan saran membangun selalu kami harapkan FROM ENTRI IURAN BULANA...