Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox date format
thismonth = CDate(Application.InputBox(prompt:="Enter the Current Month", Title:="Select Date")) i want the user to be able to input in mmm-yy format, e.g may-09. But when may-09 is entered, for example, thismonth becomes 09/05/09. Why and how can i get around this? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
inputbox date format
CDate converts this to a date in your system date time format.. You can use
the Format function to display/use this...If you are looking at putting this back to a cell; then input to the cell as it is and format the cell to mmm-yy Dim thismoonth As Variant thismonth = CDate(Application.InputBox(prompt:="Enter the Current Month", _ Title:="Select Date", Default:=Format(Date, "mmm-yy"))) MsgBox Format(thismonth, "mmm-yy") If this post helps click Yes --------------- Jacob Skaria "PBcorn" wrote: thismonth = CDate(Application.InputBox(prompt:="Enter the Current Month", Title:="Select Date")) i want the user to be able to input in mmm-yy format, e.g may-09. But when may-09 is entered, for example, thismonth becomes 09/05/09. Why and how can i get around this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Format prompt in VB InputBox | Excel Programming | |||
Make date entered in an InputBox UK format | Excel Programming | |||
inputbox uk date | Excel Programming | |||
Inputbox as Date | Excel Programming | |||
Date from InputBox | Excel Programming |