[COLOR=navy]Sub[/COLOR] MG27May16
[COLOR=navy]Dim[/COLOR] Txt [COLOR=navy]As[/COLOR] [COLOR=navy]String,[/COLOR] Fpth [COLOR=navy]As[/COLOR] [COLOR=navy]String[/COLOR]
Fpth = "C:\Documents and Settings\test\Desktop\mick.txt"
Txt = ReadEntireTextFile(Fpth)
[COLOR=navy]End[/COLOR] [COLOR=navy]Sub[/COLOR]
Function ReadEntireTextFile(strFile [COLOR=navy]As[/COLOR] String) [COLOR=navy]As[/COLOR] [COLOR=navy]String[/COLOR]
[COLOR=navy]Dim[/COLOR] i [COLOR=navy]As[/COLOR] [COLOR=navy]Integer[/COLOR]
[COLOR=navy]If[/COLOR] Dir(strFile) <> "" [COLOR=navy]Then[/COLOR]
i = FreeFile
ReadEntireTextFile = Space(FileLen(strFile))
Open strFile [COLOR=navy]For[/COLOR] Binary Access Read [COLOR=navy]As[/COLOR] #i
Get #i, , ReadEntireTextFile
Close #i
[COLOR=navy]Else[/COLOR]
ReadEntireTextFile = "File not found!"
[COLOR=navy]End[/COLOR] If
[COLOR=navy]End[/COLOR] Function