Home > Software engineering >  The list for help
The list for help

Time:09-28

Vb I want to incorporate the content of the selected LIST LIST multiple files into one file and output, to ask which under the guidance of the great god, I am beginner rookie, thank you

CodePudding user response:

What file? TXT?

Copyt *. TXT aa. TXT

CodePudding user response:

Even the novice, also have to say clearly the question,


Your so-called "LIST LIST", is a ListBox, or FileListBox?
What is the relationship between them with "file"?

CodePudding user response:

The core of the problem appears to be file synthesis,

As for which a list is not important, as long as you can determine what files,

The original poster to be sure, what is the file format? All of the files is the same format or multiple formats?

If it is. TXT file, that's easy,

Assumption is ListBox, and list item is the full path to the file:
 
Dim As Long, I Dim strFileData As String

Open "yourpath \ newfile. TXT" For the Output As the # 1
For I=0 To List1. ListCount - 1
If List1. Selected (I) Then
The Open List1. List (I) For Input As # 2
Input # 2, strFileData
Print # 1, strFileData
Close # 2
End the If
Next I
Close # 1
  • Related