Function File_Exists(ByVal PathName As String, Optional Directory As Boolean) As Boolean
If PathName <> "" Then
If IsMissing(Directory) Or Directory = False Then
File_Exists = (Dir$(PathName) <> "")
Else
File_Exists = (Dir$(PathName, vbDirectory) <> "")
End If
End If
End Function
Screen.MousePointer = vbHourglass
Dim ABC As String
ABC = "Teste"
Open "U:Meus DocumentosTabelasMenusFinAlt.txt" For Output As #2
Print #2, ABC
Close #2
Screen.MousePointer = vbNormal
MsgBox "Ok"