0
我有一個彈出框詢問日期的代碼如下:4/5/2013,如何自動將其轉換爲長日期格式?在彈出輸入框中將短日期轉換爲長日期輸入框
我試圖
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
感謝以上。我無法弄清楚如何以「更好的方式」將日期分配給特定的單元格 – xyz 2013-04-27 20:19:44