Solved

appendtext

Posted on 2007-04-05
2
223 Views
Last Modified: 2010-04-23
Why can't i use Vbcrlf here? I want it to stamp time on the same file the next line.


            Dim sw As StreamWriter = File.AppendText("mypath")



            Try

                mypath.Write(DateTime.Now.ToString("MMMM, dd, yyyy hh:mm:ss"))  & vbcrlf   <------------- error


            Catch ex As Exception


                MessageBox.Show(ex.Message)

            Finally

                mypath.Close()

            End Try
0
Comment
Question by:VBdotnet2005
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 125 total points
ID: 18860780
Put the vbCrLf INSIDE the parenthesis of the StreamWriter.Write() call:

    mypath.Write(DateTime.Now.ToString("MMMM, dd, yyyy hh:mm:ss")  & vbCrLf)
0
 

Author Comment

by:VBdotnet2005
ID: 18860823
Idle_Mind,
Thank you
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question