Please can someone help with the below part of code, id like the user to choose what formula he will be using and then choosing a variable number inside that formula which is called DateRange, but when i F8 through the DateRange goes to the number i put but then when it puts in the formula the DateRange parts shows as 0, any ideas what would cause this.


Sub SortWork()

Dim LR As Long
Dim Counter As Long
Dim DestST As String
Dim DestLR As Long
Dim DateRange As Long
Dim RESPONSE As VbMsgBoxResult
Dim Answer As String

Application.ScreenUpdating = False

RESPONSE = MsgBox("Press No To Check Forwards And Yes To Check Backwards", vbQuestion + vbYesNo, "Comex Construction")
    DateRange = Application.InputBox("How Many Days Do You Want", "COMEX CONSTRUCTION", , , , , , Type:=1)

If RESPONSE = vbNo Then
Answer = "=IF(AND(RC[-9]>=TODAY()+1,RC[-9]<=TODAY()+" & DateRange & "),"""",FALSE)"
Else
Answer = "=IF(AND(RC[-8]>=TODAY()-" & DateRange & ",RC[-8]<=TODAY()),"""",FALSE)"
End If
    
With ActiveSheet