This is for use on a UserForm.
In my reference list for “cmbReceiptsFrom”, I have one set as “aaa (April)”
How can I increment the month by ONE every time I select “aaa (April)” from the “cmbReceiptsFrom” list and THEN make the “Add Entry”.
It does ENTIRELY really on looking back up Column C for the last instance of “aaa (???) and changing it so it is the next month.
Eg;- last instance in Col C was “aaa (June)”, the next time I select “aaa (April)” from “cmbReceiptsFrom” and then "Add Entry", the entry in Col C will read “aaa (July)”
Having the “UserForm” to displaying the next consecutive month is not important; but maybe helpful.
It just needs to change the last instance of “aaa (????)” in Col C to “aaa (The Next consecutive month )” when “Add Entry” is made.
This is the code for “Add Entry”
Hopefully I have uploaded enough of the "Full UserForm" code to make an answer possible??
In my reference list for “cmbReceiptsFrom”, I have one set as “aaa (April)”
How can I increment the month by ONE every time I select “aaa (April)” from the “cmbReceiptsFrom” list and THEN make the “Add Entry”.
It does ENTIRELY really on looking back up Column C for the last instance of “aaa (???) and changing it so it is the next month.
Eg;- last instance in Col C was “aaa (June)”, the next time I select “aaa (April)” from “cmbReceiptsFrom” and then "Add Entry", the entry in Col C will read “aaa (July)”
Having the “UserForm” to displaying the next consecutive month is not important; but maybe helpful.
It just needs to change the last instance of “aaa (????)” in Col C to “aaa (The Next consecutive month )” when “Add Entry” is made.
This is the code for “Add Entry”
VBA Code:
Private Sub cmdAddEntry_Click()
Dim LastRow As Long
Dim ws As Worksheet
Set ws = ThisWorkbook.ActiveSheet
LastRow = ws.Cells(Rows.Count, 1).End(xlUp).Row + 1
With ws
'********* This takes the values from the ComboBoxes and places them in the respective columns
.Cells(LastRow, "A") = Format(Me.Calendar1.Value, "mmm/dd")
.Cells(LastRow, "C") = Me.cmbReceiptFrom
.Cells(LastRow, "D") = Me.txtItemValue.Value
Hopefully I have uploaded enough of the "Full UserForm" code to make an answer possible??