Link to home
Start Free TrialLog in
Avatar of Stephen Byrom
Stephen ByromFlag for Ireland

asked on

Another ActiveX ComboBox problem

Have a ComboBox that gets built by VBA.
I have attached the workbook (trimmed down to necessary items)
I cannot for the life of me get the ComboBox to show the correct date format (dd-mmm-yyyy) in the dropdown list, even though it shows the correct date when selected. Except for dates such as 10/7/2015 which reads as 10-Jul-2015 instead of 07-Oct-2015
Been at this for two days now, and need therapy.
Please help by running the macro attached to the button "DSV Procedure" on the PasteSheet. I have placed Stops in the code at each stage for analysis.
Any help would save me a trip to the shrink
Test4.xlsm
Avatar of Rgonzo1971
Rgonzo1971

Hi,

pls try

Private Sub ComboBox1_Change()
aTextDate = Format(ComboBox1.Text, "mm/dd/yyyy")
If Application.EnableEvents = False Then
    Exit Sub
End If
Application.EnableEvents = False
ComboBox1.Value = Format(DateSerial(Year(aTextDate), Month(aTextDate), Day(aTextDate)), "dd/mmm/yyyy")
Application.EnableEvents = True
ActiveWorkbook.Sheets("LookUpLists").Range("DSVdate").Value = Me.ComboBox1.Value
Range("DSVfigures").Font.Color = vbBlack
End Sub

Open in new window

Regards
Avatar of Stephen Byrom

ASKER

Thanks for the reply RG, but not solved the problem
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perfect! Brilliant!
Thanks so much for your time