473,385 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.
Jul 21 '05 #1
1 1578
"Stephen LeBlanc" <ma******@hotmail.com> wrote in news:172d01c37869
$6****************@phx.gbl:
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?

--
Michael Lang, MCSD

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: Peter Row | last post by:
Hi all, Here is my problem: I have a SQL Server 2000 DB with various NVarChar, NText fields in its tables. For some stupid reason the data was inserted into these fields in UTF8 encoding. ...
1
by: Alfons | last post by:
Hello, I have build a program that can do file transferring between a Windows XP computer and a DOS computer via a serial port. The Windows program I have build in C++ with Visual Studio 6.0....
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
60
by: Julie | last post by:
What is the *fastest* way in .NET to search large on-disk text files (100+ MB) for a given string. The files are unindexed and unsorted, and for the purposes of my immediate requirements, can't...
1
by: Stephen LeBlanc | last post by:
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...
5
by: Neil Rossi | last post by:
I have an issue with a particular ASP page on two web servers. Let's call these servers Dev1 and Beta1. Both Servers are running IIS 5, Windows 2000 SP4 with "almost" all of the latest patches. ...
14
by: W Marsh | last post by:
Hi. In my application I do something very simple - I open a file, lock it exclusively, write some data to it and close it. If I re-open it in the same process (I mean before the script has...
34
by: Alexnb | last post by:
Gerhard Häring wrote: No, it didn't work, but it gave me some interesting feedback when I ran it in the shell. Heres what it told me: Traceback (most recent call last): File...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.