ポップアップ ボックスを使用して長い日付に 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
ありがとう