LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 234
Default Userform Combobox to choose date

I'm having trouble, I think with formatting

Sub Userform_Initialise(
'First I populate my Combobox
Dim CountDateItem as Dat
For CountDateItem = Yesterday - 30 To Yesterday + 3
CountDate.AddItem CountDateIte
Nex

'The date is stored and displayed as text (mm/dd/yy)
'I need the date to be displayed as (dd/mm/yy
'Sometimse when I take the value from the combobox
'get the wrong date ("dd" and "mm" get swapped over

dim CombBoxDate as dat
ComboboxDate=countdate.valu
msgbox ComboBoxDat

I think I need to store the date as a date, and us
ComboBox1.Text = Format$(ComboBox1.Value, "mm/dd/yy"
but I can't work out how.

Also, am I populating the Combobox in the best way

Any help much appreciated

Thank
Rob
 
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
Value From ComboBox On UserForm jlclyde Excel Discussion (Misc queries) 3 October 16th 09 01:43 PM
ComboBox on a UserForm LLoyd Excel Worksheet Functions 2 February 20th 08 09:01 PM
Trouble with a ComboBox on a UserForm ryguy7272 Excel Worksheet Functions 1 February 19th 08 07:41 AM
Yet another userform combobox question teepee Excel Discussion (Misc queries) 4 May 17th 07 10:03 AM
Userform w/ComboBox D.Parker Excel Discussion (Misc queries) 2 May 6th 05 04:28 PM


All times are GMT +1. The time now is 10:21 PM.

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"