我有下面的代码弹出框询问日期 例如:2013 年 4 月 5 日,我如何自动将其转换为长日期格式?
我试过
strUserResponse = FormatDateTime(Date, vbLongDate)
但它只是给了我今天的约会
谢谢
Public Function AskForDeadline() As String
Dim strUserResponse As String
strUserResponse = InputBox("Enter attribute_5: Survey Deadline - In Short Date Format Ex: 4/9/2012 Will convert to LOND date AUTOMATICALLY")
strUserResponse = FormatDateTime(Date, vbLongDate)
ActiveSheet.Cells(2, 9).Value = strUserResponse 'the 2, 9 is the cell reference for I2 - row 2, column 9.
End Function