ThrottleWorks
Excel Ninja
Hi,
I am prompting user to write a date in an Input box.
Macro is getting the input box method correct however when I try to populate this string in cell the string is not visible.
If I check the value of "ThisWorkbook.Worksheets("Filepath").Range("xdf1").Value" in immediate window it shows correctly but it is not populated in the cell.
Can anyone please help me in this.
I am prompting user to write a date in an Input box.
Macro is getting the input box method correct however when I try to populate this string in cell the string is not visible.
If I check the value of "ThisWorkbook.Worksheets("Filepath").Range("xdf1").Value" in immediate window it shows correctly but it is not populated in the cell.
Can anyone please help me in this.
Code:
'Input Date
Dim TheString As String, TheDate As Date
TheString = Application.InputBox("Enter A Date in MM/DD/YYYY format only")
If IsDate(TheString) Then
TheDate = DateValue(TheString)
Else
MsgBox "Invalid date"
End If
ThisWorkbook.Worksheets("Filepath").Range("xdf1").Value = TheString