Add x number of days to a date with vba in excel

后端 未结 3 1229
时光说笑
时光说笑 2020-12-19 07:38

I am tring to add x number of days to a Long date with a pop up box.

Public Function AskForDeadlinePlus4() As String
    Dim strUserResponse As String

    s         


        
3条回答
  •  再見小時候
    2020-12-19 08:09

    Instead of using DateAdd, which requires more typing, you could also use DateValue. Following would do it.

    DateValue(strUserResponse )+I2
    

    Another solution would be using the conversion function, CDate.

    CDate(strUserResponse )+I2
    

提交回复
热议问题