Solved

appendtext

Posted on 2007-04-05
2
202 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with Syntax 9 36
VB.net Move a class from Solution Items to a project 2 22
start a process from a service 3 21
VB.NET 2008 Publish Error 2 24
This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
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…

813 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

14 Experts available now in Live!

Get 1:1 Help Now