Solved

appendtext

Posted on 2007-04-05
2
183 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
2 Comments
 
LVL 85

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now