willow1985
Well-known Member
- Joined
- Jul 24, 2019
- Messages
- 888
- Office Version
- 365
- Platform
- Windows
I read an article on how to format a date in a combo box using VBA: How to display date format in combo box output in Excel?
the code for the combo box is:
Now this works when I manually run the code in VBA however every time I change my selection in the combo box it does not reformat it and the selection goes back to numbers (see below)
Any idea's on how to get the code to run when I make a different selection?
Also, how can I also convert the Linked Cell to a number/date a formula will recognize?
the code for the combo box is:
VBA Code:
Private Sub ComboBox_Date()
ActiveSheet.Date_Start.Value = Format(ActiveSheet.Date_Start.Value, "mmmm d,yyyy")
ActiveSheet.Date_End.Value = Format(ActiveSheet.Date_End.Value, "mmmm d,yyyy")
End Sub
Now this works when I manually run the code in VBA however every time I change my selection in the combo box it does not reformat it and the selection goes back to numbers (see below)
Any idea's on how to get the code to run when I make a different selection?
Also, how can I also convert the Linked Cell to a number/date a formula will recognize?
Attachments
Last edited by a moderator: