-
Write to file
Hi ,
can anyone tell me how I can write information like username and status to
a text file using VB?
-
Re: Write to file
Hi Corne (ha) -
"Corne" <scheepersc@logica.com> wrote in message
news:3c6bc3b3$1@10.1.10.29...
>
> Hi ,
> can anyone tell me how I can write information like username and status to
> a text file using VB?
Dim sUserName As String
Dim sStatus As String
sUserName = "jsmith"
sStatus = "pending"
Open "c:\log.txt" For Output As #1
Print #1, "UserName = " & sUserName & vbCrLf & "Status = " & sStatus
Close #1
-
Re: Write to file
"Corne" <scheepersc@logica.com> wrote:
>
>Hi ,
>can anyone tell me how I can write information like username and status
to
>a text file using VB?
You must first open the file with an open statement.
Write your data to the file.
Close the file
ff=freefile
Open "c:\myfile" for output As #ff
Write #ff, data (you can also use Print)
Close #ff
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks