Dates and Combobox problems

G

Guest

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
 
G

Guest

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.
 
G

Guest

Many thanks Joel, you solved the problem!

Joel said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top