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

  • Thread starter Thread starter Stephen LeBlanc
  • Start date Start date
S

Stephen LeBlanc

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.
 
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.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top