Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date format
Hi,
i created a form whereby user will input a date and on clicking the "OK" button on the form, this date will be posted into a cell in excel. My problem is, when it is posted in excel, the cell is not formatted as a date. I need it to remain as a date so that i can make use of this cell to do other calculations. Please help. The coding of my userform is as below: Private Sub cmdOk_Click() Dim ws As Worksheet Set ws = Worksheets("FORM IR37") 'copy the data to form IR37 ws.Cells(20, 12).Value = Me.txtDate.Value 'clear the data Me.txtDate.Value = "" Me.txtDate.SetFocus 'close the form Unload Me End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert date from text format to date format | Excel Discussion (Misc queries) | |||
Convert date + time text format to date format | Excel Worksheet Functions | |||
Can I change a date with no format (20051111) to date format? | New Users to Excel | |||
day/month/year in incorrect format for date format | Excel Worksheet Functions | |||
Excel 2000 date format cannot be set to Australian date format | Excel Discussion (Misc queries) |