Maybe you should explain which code gives you the error.....
Private Sub CommandButton1_Click()

    Dim n, a As Date, b As Date

    a = Range("StartDate")
    b = Range("sendDate")

    n = DateDiff("d", a, b)

    MsgBox n

End Sub