ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Problem with date in user form (https://www.excelbanter.com/new-users-excel/234813-problem-date-user-form.html)

Ivo_69

Problem with date in user form
 
Hello,
I create user form for database that contain dates in one column.
But when I fill user form it copy the date in the database column like text
and the formulas related to this cells dosen't work.The cells in the column
are formated like dates.
How to solve this problem?

Ivo

Bernie Deitrick

Problem with date in user form
 
Ivo,

Use DateValue to convert the text to a date, like:

DataBaseCell.Value = DateValue(me.TextBox1.Text)

HTH,
Bernie
MS Excel MVP


"Ivo_69" wrote in message
...
Hello,
I create user form for database that contain dates in one column.
But when I fill user form it copy the date in the database column like text
and the formulas related to this cells dosen't work.The cells in the column
are formated like dates.
How to solve this problem?

Ivo




Simon Lloyd[_285_]

Problem with date in user form
 

Ivo_69;392161 Wrote:
Hello,
I create user form for database that contain dates in one column.
But when I fill user form it copy the date in the database column like
text
and the formulas related to this cells dosen't work.The cells in the
column
are formated like dates.
How to solve this problem?

Ivoif you are filling the userformusing add item then


Code:
--------------------

ComboBox1.AddItem Format(Date, "DD/MM/YYYY")
--------------------
really we need some more information off you, like what are you
filling?, how are you filling it?


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=109604


Ivo_69[_2_]

Problem with date in user form
 
Many thanks,

Now everything work correctly.

Ivo

"Bernie Deitrick" wrote:

Ivo,

Use DateValue to convert the text to a date, like:

DataBaseCell.Value = DateValue(me.TextBox1.Text)

HTH,
Bernie
MS Excel MVP


"Ivo_69" wrote in message
...
Hello,
I create user form for database that contain dates in one column.
But when I fill user form it copy the date in the database column like text
and the formulas related to this cells dosen't work.The cells in the column
are formated like dates.
How to solve this problem?

Ivo






All times are GMT +1. The time now is 04:06 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com