Coding Form Sales
Coding Form Sales
Coding Form Sales
Option Explicit
Application.ScreenUpdating = False
Me.TABELSALES.Value = ""
Else
Case vbNo
Exit Sub
Case vbYes
End Select
Sheet3.Select
Selection.EntireRow.Delete
Me.TXTID.Value = ""
Me.TXTNAMA.Value = ""
Me.CMBJENISKELAMIN.Value = ""
Me.TXTALAMAT.Value = ""
Me.TXTTELPON.Value = ""
Me.TXTNOMOR.Value = ""
Sheet1.Select
End If
End Sub
Me.TXTID.Value = ""
Me.TXTNAMA.Value = ""
Me.CMBJENISKELAMIN.Value = ""
Me.TXTALAMAT.Value = ""
Me.TXTTELPON.Value = ""
Me.TXTNOMOR.Value = ""
Me.TABELSALES.Value = ""
Me.CMDSIMPAN.Caption = "Save"
End Sub
If Me.TXTID.Value = "" _
Or Me.TXTNAMA.Value = "" _
Or Me.CMBJENISKELAMIN.Value = "" _
Or Me.TXTALAMAT.Value = "" _
Call MsgBox("Harap isi data barang dengan lengkap", vbInformation, "Data Barang")
Else
Me.CMBJENISKELAMIN.Clear
Call UserForm_Initialize
Me.TXTID.Value = ""
Me.TXTNAMA.Value = ""
Me.CMBJENISKELAMIN.Value = ""
Me.TXTALAMAT.Value = ""
Me.TXTTELPON.Value = ""
End If
Else
Call UpdateSales
End If
End Sub
Application.ScreenUpdating = False
Call MsgBox("Untuk mengubah Data, Pilih data terlebih dahulu", vbInformation, "Ubah Data")
Else
Me.TXTID.Value = ""
Me.TXTNAMA.Value = ""
Me.CMBJENISKELAMIN.Value = ""
Me.TXTALAMAT.Value = ""
Me.TXTTELPON.Value = ""
Me.TXTNOMOR.Value = ""
Me.CMDSIMPAN.Caption = "Save"
End If
End Sub
Application.ScreenUpdating = False
Me.TXTNOMOR.Value = Me.TABELSALES.Value
Me.TXTID.Value = Me.TABELSALES.Column(1)
Me.TXTNAMA.Value = Me.TABELSALES.Column(2)
Me.CMBJENISKELAMIN.Value = Me.TABELSALES.Column(3)
Me.TXTALAMAT.Value = Me.TABELSALES.Column(4)
Me.TXTTELPON.Value = Me.TABELSALES.Column(5)
Me.CMDSIMPAN.Caption = "Update"
Sheet3.Select
CELLAKTIF = ActiveCell.Row
Sheet1.Select
Exit Sub
EXCELVBA:
End Sub
DSALES = Application.WorksheetFunction.CountA(Sheet3.Range("A6:F90000"))
If DSALES = 0 Then
Me.TABELSALES.RowSource = ""
Else
End If
With CMBJENISKELAMIN
.AddItem "Perempuan"
End With
End Sub