mdmackillop
01-18-2006, 02:10 PM
For UK language setup only
Try the following. Enter 1/2/06 in the input box
Sub InsertDate()
Range("A1:A2").NumberFormat = "dd mmmm yyyy"
tmp = InputBox("Insert date")
[A1] = tmp
[A2] = DateValue(tmp)
End Sub
My Result
A1 = 02 January 2006
A2 = 01 February 2006
Try the following. Enter 1/2/06 in the input box
Sub InsertDate()
Range("A1:A2").NumberFormat = "dd mmmm yyyy"
tmp = InputBox("Insert date")
[A1] = tmp
[A2] = DateValue(tmp)
End Sub
My Result
A1 = 02 January 2006
A2 = 01 February 2006