Dim Now As DateTime = DateTime.Now Dim Span As TimeSpan Dim fileDate As String fileDate = FileDateTime("D:\a.txt") Span = Now.Subtract(fileDate) If Span <> 0 Then ←ここでエラーが出るので、Spanを何か(数値型など)に変換すればいける? EndIf