I have made a Userform that allows the user to input data from budgeting transactions. The way it currently works is that it will input the user data in the very next available empty row. I am trying to how this same input data be inserted in new cells B6:G6, transferring all of the previous cell down a row. I want to happen each time a new transaction is entered.
The following code is how it is currently set up to handle the input data:
Private Sub OKButton_Click()
Dim emptyRow As Long
With Sheets("Daily Ledger")
emptyRow = .Cells(Rows.Count, "B").End(xlUp).Row + 1
'Transfer information
.Cells(emptyRow, 2).Value = DateTextBox.Value
.Cells(emptyRow, 3).Value = DescriptionTextBox.Value
.Cells(emptyRow, 4).Value = CategoryComboBox.Value
.Cells(emptyRow, 5).Value = SubCategoryComboBox.Value
.Cells(emptyRow, 6).Value = AmountTextBox.Value
.Cells(emptyRow, 7).Value = IIf(TransactionOptionButton1.Value = True, "Debit", "Credit")
End With
Unload Me
End Sub
Thanks for the help!
Bookmarks