G
Guest
I would like to be able to prompt the user to enter a date and place this
information in a cell (with a number format which has category Custom and
Type "dd/mm/yyyy" .
I tried the following code, however if the user enters 7/2/05 it will appear
in the cell as 2/7/05:
Message = "Enter the start date for the report"
Title = "Start Date"
Default = "7/2/05"
StartDate = InputBox(Message, Title, Default)
Sheets("Weekly").Select
Range("G5").Select
ActiveCell.NumberFormat = "dd/mm/yyyy"
ActiveCell.FormulaR1C1 = StartDate
Any suggestions as to how to fix this would be much appreciated.
information in a cell (with a number format which has category Custom and
Type "dd/mm/yyyy" .
I tried the following code, however if the user enters 7/2/05 it will appear
in the cell as 2/7/05:
Message = "Enter the start date for the report"
Title = "Start Date"
Default = "7/2/05"
StartDate = InputBox(Message, Title, Default)
Sheets("Weekly").Select
Range("G5").Select
ActiveCell.NumberFormat = "dd/mm/yyyy"
ActiveCell.FormulaR1C1 = StartDate
Any suggestions as to how to fix this would be much appreciated.