opening a text file for write that previously didn't exist

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

    opening a text file for write that previously didn't exist

    I'm having an issue coding in VB.NET. I'm trying to
    create a program that let's a user choose 2 files, using
    the OpenFileDialog control:1 file exists and contains
    data for extraction, the other file is to store the
    output from doing some events in program. The problem is,
    when the user clicks a button, that opens the
    OpenFileDialog box, then types the name of the file that
    he'd like the output to be stored in, it gives me a 'file
    doesn't exist' error message. I need to be able to give
    the user the freedom of choosing whatever file he'd like
    to have the data stored in, but this error is preventing
    that. Please offer any advise to fix this error.
    Thanks.
  • Michael Lang

    #2
    Re: opening a text file for write that previously didn't exist

    "Stephen LeBlanc" <math_god@hotma il.com> wrote in news:172d01c378 69
    $6c481b70$a6012 80a@phx.gbl:
    [color=blue]
    > I'm having an issue coding in VB.NET. I'm trying to
    > create a program that let's a user choose 2 files, using
    > the OpenFileDialog control:1 file exists and contains
    > data for extraction, the other file is to store the
    > output from doing some events in program. The problem is,
    > when the user clicks a button, that opens the
    > OpenFileDialog box, then types the name of the file that
    > he'd like the output to be stored in, it gives me a 'file
    > doesn't exist' error message. I need to be able to give
    > the user the freedom of choosing whatever file he'd like
    > to have the data stored in, but this error is preventing
    > that. Please offer any advise to fix this error.
    > Thanks.
    >[/color]

    Why don't you use the SaveFileDialog for the output file?

    --
    Michael Lang, MCSD

    Comment

    Working...