Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Date format in userform


I have a userform with a combobox that has dates that you can choose
from. The list of dates look correct but when you choose a date it
changes to the general number on the form. How can I change it so when
you choose the date it still looks like a date???


--
cutsygurl
------------------------------------------------------------------------
cutsygurl's Profile: http://www.excelforum.com/member.php...o&userid=15041
View this thread: http://www.excelforum.com/showthread...hreadid=485635

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Date format in userform

That is rather unfortunate, isn't it? I have a workaround, but it only works
if the Combobox.MatchRequired property is False: In the Combobox_Change
event code, put code like this:

Private Sub ComboBox1_Change()

ComboBox1.Text = Format(ComboBox1.Value, "mm/dd/yyyy")

End Sub

--
- K Dales


"cutsygurl" wrote:


I have a userform with a combobox that has dates that you can choose
from. The list of dates look correct but when you choose a date it
changes to the general number on the form. How can I change it so when
you choose the date it still looks like a date???


--
cutsygurl
------------------------------------------------------------------------
cutsygurl's Profile: http://www.excelforum.com/member.php...o&userid=15041
View this thread: http://www.excelforum.com/showthread...hreadid=485635


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Date format in userform

Hi, I have been experiencing the same problems with dates. I have a combo
box on a user form that links to a column on a worksheet containing a list of
dates. When I click on the combo box a list of dates in the correct format
appear. However, when I select a date it appears as a text field,

I tried inserting the code as described below but I haven't had any luck.
Has anybody any other ideas??

"K Dales" wrote:

That is rather unfortunate, isn't it? I have a workaround, but it only works
if the Combobox.MatchRequired property is False: In the Combobox_Change
event code, put code like this:

Private Sub ComboBox1_Change()

ComboBox1.Text = Format(ComboBox1.Value, "mm/dd/yyyy")

End Sub

--
- K Dales


"cutsygurl" wrote:


I have a userform with a combobox that has dates that you can choose
from. The list of dates look correct but when you choose a date it
changes to the general number on the form. How can I change it so when
you choose the date it still looks like a date???


--
cutsygurl
------------------------------------------------------------------------
cutsygurl's Profile: http://www.excelforum.com/member.php...o&userid=15041
View this thread: http://www.excelforum.com/showthread...hreadid=485635


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Date format in userform

check your code

yours = ComboBox1.Text = Format(ComboBox1.Value, "mm/dd/yyyy")
should be = ComboBox1.Value = Format(ComboBox1.Value, "mm/dd/yyyy")


"CiaraG" wrote:

Hi, I have been experiencing the same problems with dates. I have a combo
box on a user form that links to a column on a worksheet containing a list of
dates. When I click on the combo box a list of dates in the correct format
appear. However, when I select a date it appears as a text field,

I tried inserting the code as described below but I haven't had any luck.
Has anybody any other ideas??

"K Dales" wrote:

That is rather unfortunate, isn't it? I have a workaround, but it only works
if the Combobox.MatchRequired property is False: In the Combobox_Change
event code, put code like this:

Private Sub ComboBox1_Change()

ComboBox1.Text = Format(ComboBox1.Value, "mm/dd/yyyy")

End Sub

--
- K Dales


"cutsygurl" wrote:


I have a userform with a combobox that has dates that you can choose
from. The list of dates look correct but when you choose a date it
changes to the general number on the form. How can I change it so when
you choose the date it still looks like a date???


--
cutsygurl
------------------------------------------------------------------------
cutsygurl's Profile: http://www.excelforum.com/member.php...o&userid=15041
View this thread: http://www.excelforum.com/showthread...hreadid=485635


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Format for Userform TextBox John Calder New Users to Excel 4 July 29th 09 10:19 PM
Restrict date format for UserForm Rob Excel Discussion (Misc queries) 2 December 19th 05 12:13 AM
UserForm including TextBox with date (UK format) John Elink Excel Programming 2 December 1st 04 09:02 AM
Qn: Date Format in TextBox in UserForm? Michael Vaughan Excel Programming 1 August 23rd 04 10:03 AM
Userform date format problem jennie Excel Programming 2 July 30th 04 01:49 PM


All times are GMT +1. The time now is 02:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"