Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 12th, 2006, 07:52 AM
Friend of Wrox
 
Join Date: Mar 2005
Posts: 264
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to write to text file ?

Hi all . I have a search result that is outputed to listview in my vb6 form and i wonder how i can write the output data in to text file which is readable instead of showing it listview. I be happy if an expert show me how .Thanks


Here is my code that displays data in lisview . I want the data to be writen in text file instead:

Code:
Private Sub cReg_SearchFound(ByVal sRootKey As String, ByVal sKey As String, ByVal sValue As Variant, ByVal lFound As FOUND_WHERE)
   Dim lvItm As ListItem
   Select Case lFound
         Case FOUND_IN_KEY_NAME
              sTemp = "KEY_NAME"
         Case FOUND_IN_VALUE_NAME
              sTemp = "VALUE NAME"
         Case FOUND_IN_VALUE_VALUE
              sTemp = "VALUE VALUE"
   End Select
   With ListView1
       Set lvItm = .ListItems.Add(, , sTemp)
       lvItm.SubItems(1) = sRootKey
       lvItm.SubItems(2) = sKey
       lvItm.SubItems(3) = sValue

   End With      Set lvItm = Nothing
End Sub
 
Old April 13th, 2006, 01:54 AM
Authorized User
 
Join Date: Mar 2006
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
use OPEN statement to write data in text file
Peko






Similar Threads
Thread Thread Starter Forum Replies Last Post
Write Tab-delimited text file VikramMullick Pro VB.NET 2002/2003 1 May 5th, 2006 11:18 AM
Write ASCII text file muklee C# 1 December 12th, 2004 09:40 PM
Write Text file from recordset rylemer Access 2 December 5th, 2003 10:23 AM
Write column heading to text file cat_trio Access VBA 0 November 13th, 2003 02:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.