我正在尝试使用弹出框将 x 天数添加到长日期。
Public Function AskForDeadlinePlus4() As String
Dim strUserResponse As String
strUserResponse = InputBox("Enter Validuntil Date: Add # of Days To Survey end date")
strUserResponse = FormatDateTime(strUserResponse + I2, vbLongDate)
ActiveSheet.Cells(2, 10).Value = strUserResponse 'the 2, 10 is the cell reference for J2 - row 2, column 10.
End Function
其中 I2 单元格中的调查结束日期。
当我运行这个我得到(谷歌搜索如何做到这一点我很累)
4 + I2
(在哪里I2 = Friday, April 05, 2013
)>> Wednesday, January 03, 1900
我当然需要Tuesday, April 09, 2013
谢谢