Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
formating inputbox result in excel
Hi, I have use the inputbox method to seek from the user a date. When the
date 1st Feb 2006 (1/02/2006) is placed into the sheet it shows in the mm/dd/yy format. I have tried formatting the cell to dd/mm/yy. I know that there is a way and it has (i think) to do with a special paste function to allow all dates entered in the inputbox to be in the Australian format (dd/mm/yy) context. Many thanks in adavance for any help. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
formating inputbox result in excel
Hi NoelH,
try this... Public Sub CorrectDate() Dim strDate As String strDate = Application.InputBox("What Date?", 2) Cells(1, 1) = CDate(strDate) End Sub ie, the CDate conversion seems to do the trick. Fellow Aussie Ken Johnson |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
formating inputbox result in excel
Hi Ken
Thanks works like a dream. Noel "Ken Johnson" wrote: Hi NoelH, try this... Public Sub CorrectDate() Dim strDate As String strDate = Application.InputBox("What Date?", 2) Cells(1, 1) = CDate(strDate) End Sub ie, the CDate conversion seems to do the trick. Fellow Aussie Ken Johnson |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
formating inputbox result in excel
You're welcome Noel.
Thanks for the feedback. Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
How to Convert Figures into Text in Excel | Excel Worksheet Functions | |||
Displays the number in text. (One thousand two hundred thirty four | Excel Worksheet Functions | |||
Currency to Text | Excel Worksheet Functions | |||
VBA | Excel Worksheet Functions |