469,623 Members | 1,422 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,623 developers. It's quick & easy.

write text file

hallow all

i'm using a common dialog to save data into a text file.
for so far i have this, but can someone give me a simpe exaple what i have
to do after the line Open cdl.FileName For Output As #1 so itt writes some
simple data.

thanks Maarten

On Error GoTo errhandler

cdl.Flags = cdlOFNHideReadOnly Or cdlOFNOverwritePrompt
cdl.DialogTitle = "save program"
cdl.Filter = "regelaar (*.txt)|*.txt"
cdl.FileName = "Show"
cdl.ShowSave
Open cdl.FileName For Output As #1

Close #1

errhandler:
Jul 17 '05 #1
1 14754
On Sun, 5 Sep 2004 13:23:07 +0200, "Gurk" <gu******@hotmail.com>
wrote:
hallow all

i'm using a common dialog to save data into a text file.
for so far i have this, but can someone give me a simpe exaple what i have
to do after the line Open cdl.FileName For Output As #1 so itt writes some
simple data.


The 'Common Dialogs' have /nothing/ to do with opening files, reading
them or writing to them

They are just 'File Name Pickers'

Here is how to write to a file :-

Channel = FreeFile

Open "C:\test.dat" For Output As #Channel
Print# Channel, "Some text here";
Close# Channel

Never confuse 'Eye Candy' with code
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Google Mike | last post: by
6 posts views Thread by Kevin Ingram | last post: by
1 post views Thread by WebSim via .NET 247 | last post: by
1 post views Thread by lokeshrajoria | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.