sunilmulay
10-24-2008, 07:46 AM
Hi there
I have this bit of code which is run on clicking on a control, which enters the user entered date into a particular cell. The cell (K3) has been formatted to the British date system DD-MM-YR. Yet if the user enters 04-01-08 (for 4th Jan 2008), the macro enters 1st of April into the cell!
Hope you can help...
Thanks
Sunil
Sub PostTrackStatus01()
Dim mKey As String
Application.ScreenUpdating = False
Sheets("1TL").Unprotect Password:=pWord
Sheets("1TR").Unprotect Password:=pWord
Sheets("1A").Unprotect Password:=pWord
mKey = InputBox("Enter date up to which you are posting progress in the format: DD-MM-YR", _
"Enter Date")
Worksheets("1TR").Range("K3").Value = mKey
End Sub
I have this bit of code which is run on clicking on a control, which enters the user entered date into a particular cell. The cell (K3) has been formatted to the British date system DD-MM-YR. Yet if the user enters 04-01-08 (for 4th Jan 2008), the macro enters 1st of April into the cell!
Hope you can help...
Thanks
Sunil
Sub PostTrackStatus01()
Dim mKey As String
Application.ScreenUpdating = False
Sheets("1TL").Unprotect Password:=pWord
Sheets("1TR").Unprotect Password:=pWord
Sheets("1A").Unprotect Password:=pWord
mKey = InputBox("Enter date up to which you are posting progress in the format: DD-MM-YR", _
"Enter Date")
Worksheets("1TR").Range("K3").Value = mKey
End Sub