Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open, Read, Display&Overwrite Textfile($)

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How to Display the string from a Textfile in a MsgBox, ...
<%code:
Dim FSO
Set FSO = WScript.CreateObject(&quot;WScriptin.FileSys...&quot;)

Const FILEPATH = &quot;D:\Sefiroth\Library\Logs\Lynx.log&quot;

Dim Text
Set Text = FSO.OpenTextFile(FILEPATH)

Set ReadText = Text.ReadAll

MsgBox ReadText, vbInformation + 0, &quot;Filecontents:&quot;


'''Error = Line6: Object required[string:&quot;xxxxxxx&quot;] ???
'''then import it for an addition 'n finally overwrite it?


Text.ReadAll

MsgBox Text, vbInformation + 0, &quot;Textinhalt:&quot;

Text.Close

FSO.CreateTextFile(&quot;FILEPATH&quot;, True)
Dim NewTime
NewTime = Now
Text.WriteLine NewTime
'''Error = Cannot use parentheses while calling a sub.
:code%>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top