tags:

views:

205

answers:

2

Hello,

I'm trying to know how to save a content of a TextField to a File, like a .txt, using a Common Dialog, only a command dialog in Visual Basic 6, i need this using a only a common dialog, because i'm trying to do the same aplication in eVB, and eVB does not support this methods:

   Dim objFSO As New Scripting.FileSystemObject
   Dim objStream As Scripting.TextStream

Please help me, i'm needing this so much! Thanks.

+1  A: 

I am not familiar with eVB, but does it support legacy style file operations like this:

Open "filename.txt" for output as #1
Print #1, yourtextfield.text
Close #1
OneNerd
Thanks very much!!!!!!!
Nathan Campos
This appends an end of line to the text box contents. Fine if that's what you want - however you may not want this with a multi-line text-box, particularly if you are repeatedly loading and saving the file. Add a semicolon to the end of the Print line to avoid adding the end of line (line-feed and carriage-return).
MarkJ
+1  A: 
Dim fileHandle As File 
Set fileHandle = CreateObject("FILECTL.File")
fileHandle.Open "filename.txt", 2 
fileHandle.LinePrint "some text"
fileHandle.Close
Set fileHandle = Nothing
rpetrich
Also, eVB is more similar to VBS than VB5/6
rpetrich
Thanks very much, you solved my problem!!!!!!!!!!!
Nathan Campos