Was working but now not

  • Thread starter Thread starter MadCrazyNewbie
  • Start date Start date
M

MadCrazyNewbie

Hey Group,

Sorry i know i must be a pain, but .........

Dim FILE_NAME As String = "C:\LogFile.txt"
If Not file.Exists(FILE_NAME) Then
Exit Sub
Else
End If

This code was working fine, but now it tells me file is not declaired?

Anybody point me in the right direction?

Many Thanks
MCN
 
Hello,

Do you still have Imports System.IO at the top of your file?

Simon
(e-mail address removed)
 
* "MadCrazyNewbie said:
Sorry i know i must be a pain, but .........

Dim FILE_NAME As String = "C:\LogFile.txt"
If Not file.Exists(FILE_NAME) Then
Exit Sub
Else
End If

This code was working fine, but now it tells me file is not declaired?

Add 'Imports System.IO' on top of your source file.
 
Hi,
Have you imported System.IO namespace? Or fully qualify File type as in
System.IO.File.Exists().

Hey Group,

Sorry i know i must be a pain, but .........

Dim FILE_NAME As String = "C:\LogFile.txt"
If Not file.Exists(FILE_NAME) Then
Exit Sub
Else
End If

This code was working fine, but now it tells me file is not declaired?

Anybody point me in the right direction?

Many Thanks
MCN
 
Back
Top