ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formated date thru Input box (https://www.excelbanter.com/excel-programming/274622-formated-date-thru-input-box.html)

Soniya

Formated date thru Input box
 
hi all,

how can i get a user input a date and get it in my Cell
C8 formated in dd/mm/yyy ?

something like:


Newdate = inputbox("Enter New Date: ", Date)

and this will be my date in C8?


TIA
Soniya


Tom Ogilvy

Formated date thru Input box
 
Newdate = inputbox("Enter New Date: ", Date)
if isdate(newDate) then
With Worksheets("Sheet1")
.Range("C8").Value = cDate(newDate)
.Range("C8").NumberFormat = "dd/mm/yyyy"
End With
End if

--
Regards,
Tom Ogilvy

"Soniya" wrote in message
...
hi all,

how can i get a user input a date and get it in my Cell
C8 formated in dd/mm/yyy ?

something like:


Newdate = inputbox("Enter New Date: ", Date)

and this will be my date in C8?


TIA
Soniya





All times are GMT +1. The time now is 06:43 PM.

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