Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Dates and Combobox problems

I have a user form with a combobox that has a row source set to cells
formatted as dd-mmm-yy. My problem is that the combobox displays this as a
serial number and then writes the date to the worksheet as mm-dd-yy. The
regional settings are set to English.I guess this is basic, but it is giving
me real problems. Any help would be much appreciated. Many thanks Graham
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Dates and Combobox problems

When you put a date in a combox you need to convert it to a string. the can
be done with a format statement

string_date = format(mydate,"mm-dd-yy"). You want to write the actual
serial number date to the worksheet and make sure the cells are format as
date so you don't get a serial number displayed on the worksheet.

"Graham F" wrote:

I have a user form with a combobox that has a row source set to cells
formatted as dd-mmm-yy. My problem is that the combobox displays this as a
serial number and then writes the date to the worksheet as mm-dd-yy. The
regional settings are set to English.I guess this is basic, but it is giving
me real problems. Any help would be much appreciated. Many thanks Graham

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Dates and Combobox problems

Many thanks Joel, you solved the problem!

"Joel" wrote:

When you put a date in a combox you need to convert it to a string. the can
be done with a format statement

string_date = format(mydate,"mm-dd-yy"). You want to write the actual
serial number date to the worksheet and make sure the cells are format as
date so you don't get a serial number displayed on the worksheet.

"Graham F" wrote:

I have a user form with a combobox that has a row source set to cells
formatted as dd-mmm-yy. My problem is that the combobox displays this as a
serial number and then writes the date to the worksheet as mm-dd-yy. The
regional settings are set to English.I guess this is basic, but it is giving
me real problems. Any help would be much appreciated. Many thanks Graham

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
ComboBox Problems mastermind Excel Programming 1 April 24th 07 11:08 PM
ComboBox Problems trini Excel Programming 1 September 9th 05 08:45 PM
Problems with Combobox MBais[_2_] Excel Programming 3 July 25th 05 01:37 PM
ComboBox Problems Darrin Henry[_2_] Excel Programming 1 April 15th 05 10:07 PM
ComboBox Problems Darrin Henry Excel Programming 1 September 16th 03 01:23 AM


All times are GMT +1. The time now is 07:48 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"