マイナス1とか減算指定なら、今日の日付から引いて日付/時間にする例
Function FUNC(aDate As String,aTime As String)
Dim dDate As Date
Dim dTime As Date
If IsDate(aDate) Then
dDate = CDate(aDate)
ElseIf CInt(aDate) <= 0 Then
dDate = DateAdd("d", CInt(aDate), Now())
Else
FUNC = "N/A(パラメータエラー:日付)"
Exit Function
End If
If IsDate(aTime) Then
dTime = CDate(aTime)
ElseIf CInt(aTime) <= 0 Then
dTime = DateAdd("n", CInt(aTime), Now())
Else
FUNC = "N/A(パラメータエラー:時間)"
Exit Function
End If
ネタ元