write text file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gurk

    #1

    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 = cdlOFNHideReadO nly Or cdlOFNOverwrite Prompt
    cdl.DialogTitle = "save program"
    cdl.Filter = "regelaar (*.txt)|*.txt"
    cdl.FileName = "Show"
    cdl.ShowSave
    Open cdl.FileName For Output As #1

    Close #1

    errhandler:


  • J French

    #2
    Re: write text file

    On Sun, 5 Sep 2004 13:23:07 +0200, "Gurk" <gurkjaan@hotma il.com>
    wrote:
    [color=blue]
    >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.[/color]

    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.da t" For Output As #Channel
    Print# Channel, "Some text here";
    Close# Channel

    Never confuse 'Eye Candy' with code

    Comment

    Working...