![]() |
Format date in combobox
Im trying to have a date displayed in the combox as wednesday,
September6. How could I go about doing this I have tried the format(date, yyyy etc method and it works for combobox4 but cant use that in combobox3 below. ie combobox 4 is the start date comboboxx3 is the end date. I want the enddate selection to begin with the value enter in cobobox4 Thanks Mike Private Sub ComboBox3_DropButtonClick() Dim leavingdate As Date leavingdate = ComboBox4.Value ComboBox3.List = Array(leavingdate, leavingdate + 1, leavingdate + 2) End Sub |
Format date in combobox
Private Sub ComboBox3_DropButtonClick()
Dim leavingdate As Date leavingdate = ComboBox4.Value ComboBox3.List = Array(Format(leavingdate, "mmmm d"), _ Format(leavingdate + 1, "mmmm d"), _ Format(leavingdate + 2, "mmmm d")) End Sub -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "susan" wrote in message ... Im trying to have a date displayed in the combox as wednesday, September6. How could I go about doing this I have tried the format(date, yyyy etc method and it works for combobox4 but cant use that in combobox3 below. ie combobox 4 is the start date comboboxx3 is the end date. I want the enddate selection to begin with the value enter in cobobox4 Thanks Mike Private Sub ComboBox3_DropButtonClick() Dim leavingdate As Date leavingdate = ComboBox4.Value ComboBox3.List = Array(leavingdate, leavingdate + 1, leavingdate + 2) End Sub |
All times are GMT +1. The time now is 02:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com