Remove all the codes from the userform module and put this one.
Code:
Private Sub cmdInsert_Click()
Dim intRow As Integer
intRow = Sheet1.UsedRange.Rows.Count + 1
Sheet1.Cells(intRow, "A") = txtItemName.Text
Sheet1.Cells(intRow, "B") = cboRoom.Text
Sheet1.Cells(intRow, "C") = cboCategory.Text
Sheet1.Cells(intRow, "D") = txtQuantity.Value
Sheet1.Cells(intRow, "E") = txtValue.Value
' txtName.Text = ""
' txtAddress.Text = ""
' txtCity.Text = ""
' cboState.Text = ""
' txtZip.Text = ""
End Sub
Private Sub UserForm_Initialize()
Dim vRoom As Variant, vCategory As Variant
vRoom = Array("Kitchen", "Living Room", "Bedroom", "Other")
vCategory = Array("Electronics", "Furniture", "China/Silverware", "Other")
cboRoom.List = vRoom
cboCategory.List = vCategory
End Sub
Bookmarks