Thread: Overflow error
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tatsujin Tatsujin is offline
external usenet poster
 
Posts: 25
Default Overflow error

Any know how to fix this overflow error? Cell A1 has a date value of "01/01/2200".

Sub errTest()
Dim d1, currDay As Date
Dim r As Integer

currDay = Date
d1 = Sheet1.Range("A1").Value

r = currDay - d1 - 7 ' Error because A1 = 01/01/2200

msgbox r

End Sub