I have a user form that has two listboxes for dates an order date and requested ship date. I wanted to only show the next 12 months in the list box so I have this to populate the listboxes
Private Sub UserForm_Initialize()
With shipdatelist
For i = 0 To 24
.AddItem Format(DateAdd("m", i, Date), "mmm-yy")
Next i
End With
With orderdatelist
For i = 0 To 24
.AddItem Format(DateAdd("m", i, Date), "mmm-yy")
Next i
End With
End Sub
And then have this to enter the information selected
NextRow = ws.Range("A10000").End(xlUp).Row + 1
ws.Cells(NextRow, 1).Value = Customer.Text
ws.Cells(NextRow, 2).Value = Regionlist.Value
ws.Cells(NextRow, 3).Value = Modellist.Value
ws.Cells(NextRow, 4).Value = Quantity.Value
ws.Cells(i + NextRow, 5).FormulaR1C1 = Cells(2, 5).FormulaR1C1
ws.Cells(NextRow, 6).Value = Possibilitylist.Value
ws.Cells(NextRow, 7).Value = orderdatelist.Value
ws.Cells(NextRow, 8).Value = shipdatelist.Value
But for some reason the date that is entered is always the current year and not the one selected. Is that because i am only adding months to the current date? not sure how else to go about this, any help you could give me would be greatly appreciated
Bookmarks