Actually this is from text book.
My code is:
when I tested running it, error code appear and the 'TempDate' is highlighted yellow.Code:Private Sub mnuCheck_Click() Dim TempDate As Date CheckFile = Dir(ThisDir, vbNormal) Do While CheckFile <> "" If Right(CheckFile, 3) = "cqu" Then Open CurDir + "\Car Quotes\" + CheckFile For Input As #1 Line Input #1, TempDate If Date - TempDate > 30 Then txtDate = TempDate End If End If CheckFile = Dir Loop End Sub
could someone please tell where my mistake is..?
p/s:Just tell me if I need to add more information if the code above is not enough




Reply With Quote