Userform and passing date values

D

DTM

Hi all,
Hey I have a userform in which I want the user to enter a
date in a field (NZ dd/mm/yy). First of all is there
anyway to format the text box to be a date format?
but more importantly - when the value is passed to the
cell I want to put it in - if the date is for example
05/04/03 (5th April 03) on the form - it enters the value
04/05/03 (4th May 03) no matter how I format the cell or
the date to use the NZ format of day/month/year it comes
back month/day/year.

This only happens when the day/months could be reversible.
IE if I enter 23/6/03 it treats it like I want it to
dd/mm/yy.

the code I'm using to pass the variable to the cell is:

NextRow = Application.WorksheetFunction.CountA(Range
("D:D")) + 5
etc etc
Cells(NextRow, 3) = Referral_date.Text

thanks for any help
dean
 
T

Tom Ogilvy

Can't format a textbox.

Cells(NextRow, 3) = cDate(Referral_date.Text)

Might help.

Regards,
Tom Ogilvy
 

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