473,396 Members | 2,011 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,396 software developers and data experts.

Need Help with Output to Text

Here's my script--need help with output to text file (must be missing
something here like closing the file or something). Any help would be
greatly appreciated here. Lastly, I'm using Visual Basic .NET 2003.
Source...

Dim vFileName As String
vFileName = Format(Now(), "MM - dd - yyyy") & " - " & vName
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
oWrite = oFile.CreateText("C:\" & vFileName & ".txt")

FileOpen(1, "C:\" & vFileName & ".txt", OpenMode.Output) 'CAN'T GET TEXT TO
WRITE TO FILE
oWrite.WriteLine("Debugging Code is Fun")
oWrite.WriteLine("And Pigs Fly")
Todd
Jul 17 '05 #1
2 11374

This group is really for VB6 and earlier. I recommend you take a look at the
groups devoted exclusively to .net programming on the microsoft news server,
named such as:

news://msnews.microsoft.com/microsof...dotnet.general
news://msnews.microsoft.com/microsof...t.languages.vb
news://msnews.microsoft.com/microsof....vsnet.general
news://msnews.microsoft.com/microsof...studio.general
news://msnews.microsoft.com/microsof....vstudio.setup

.... etc.

--
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
"Todd Shillam" <tshillam(@)hotmail.com> wrote in message
news:TI********************@comcast.com...
: Here's my script--need help with output to text file (must be missing
: something here like closing the file or something). Any help would be
: greatly appreciated here. Lastly, I'm using Visual Basic .NET 2003.
: Source...
:
: Dim vFileName As String
: vFileName = Format(Now(), "MM - dd - yyyy") & " - " & vName
: Dim oFile As System.IO.File
: Dim oWrite As System.IO.StreamWriter
: oWrite = oFile.CreateText("C:\" & vFileName & ".txt")
:
: FileOpen(1, "C:\" & vFileName & ".txt", OpenMode.Output) 'CAN'T GET TEXT
TO
: WRITE TO FILE
: oWrite.WriteLine("Debugging Code is Fun")
: oWrite.WriteLine("And Pigs Fly")
:
:
: Todd
:
:

Jul 17 '05 #2
Randy,

I got it; however, thanks for the references--I'll be sure to check them
out.

Best regards,

Todd

"Randy Birch" <rg************@mvps.org> wrote in message
news:EP********************@rogers.com...

This group is really for VB6 and earlier. I recommend you take a look at
the
groups devoted exclusively to .net programming on the microsoft news
server,
named such as:

news://msnews.microsoft.com/microsof...dotnet.general
news://msnews.microsoft.com/microsof...t.languages.vb
news://msnews.microsoft.com/microsof....vsnet.general
news://msnews.microsoft.com/microsof...studio.general
news://msnews.microsoft.com/microsof....vstudio.setup

... etc.

--
Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
"Todd Shillam" <tshillam(@)hotmail.com> wrote in message
news:TI********************@comcast.com...
: Here's my script--need help with output to text file (must be missing
: something here like closing the file or something). Any help would be
: greatly appreciated here. Lastly, I'm using Visual Basic .NET 2003.
: Source...
:
: Dim vFileName As String
: vFileName = Format(Now(), "MM - dd - yyyy") & " - " & vName
: Dim oFile As System.IO.File
: Dim oWrite As System.IO.StreamWriter
: oWrite = oFile.CreateText("C:\" & vFileName & ".txt")
:
: FileOpen(1, "C:\" & vFileName & ".txt", OpenMode.Output) 'CAN'T GET TEXT
TO
: WRITE TO FILE
: oWrite.WriteLine("Debugging Code is Fun")
: oWrite.WriteLine("And Pigs Fly")
:
:
: Todd
:
:

Jul 17 '05 #3

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

Similar topics

0
by: TN Bella | last post by:
This may be a double post... I appreciate all the help I have gotten on here - thank you! So with that in mind, I figured I would try another post! :) I need to reformat the following...
2
by: DC | last post by:
The Code <%@ import namespace="System" %> <%@ import namespace="System.Web" %> <%@ import namespace="System.Web.UI" %> <%@ import namespace="System.Web.UI.HtmlControls" %> <%@ import...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
4
by: naknak4 | last post by:
Introduction This assignment requires you to develop solutions to the given problem using several different approaches (which actually involves using three different STL containers). You will...
6
by: naknak | last post by:
Introduction This assignment requires you to develop solutions to the given problem using several different approaches (which actually involves using three different STL containers). You will...
1
by: Osoccer | last post by:
...to a different folder and in the relocated file concatenates all of the lines in one long string with a space between each line element. Here is a fuller statement of the problem: I need a...
2
by: lifeshortlivitup | last post by:
I had to create a program that allows the user to input a temp and then click on either the convert to fahrenheit or convert to celsius button and then display that result within the textbox that...
14
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the...
3
by: Water Cooler v2 | last post by:
Sorry for asking this beginner question. I've written DTDs so far and read about XML Schemas. I understand that they are a replacement of the DTD fundamentally, and therefore allow for the...
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: 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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.