/
Forside
/
Teknologi
/
Udvikling
/
VB/Basic
/
Nyhedsindlæg
Login
Brugernavn
*
Kodeord
*
Husk mig
Brugerservice
Kom godt i gang
Bliv medlem
Seneste indlæg
Stil et spørgsmål
Skriv et tip
Pointsystemet
Kontakt Kandu.dk
Emnevisning
Kategorier
Alfabetisk
Karriere
Interesser
Teknologi
Reklame
Top 10 brugere
VB/Basic
#
Navn
Point
1
berpox
2425
2
pete
1435
3
CADmageren
1251
4
gibson
1230
5
Phylock
887
6
AntonV
790
7
strarup
750
8
Benjamin...
700
9
tom.kise
610
10
EXTERMINA..
600
FileListBox
Fra :
Sjoerd
Dato :
19-09-02 09:44
Hello,
I use a FileList-box and want to write the content of this box to a
text-file. I assume this is possible, but how????
First open a file for output
Then using a loop-statement to read alle the entries of the FileListBox
Finally close the output-file
What is the code for the "loop-part"?
Thanks for helping me.
Sjoerd
svo@home.nl
John Doe (
19-09-2002
)
Kommentar
Fra :
John Doe
Dato :
19-09-02 11:46
Assumening your file-box is named: "file1".
Add a command-button: "command1"
Paste:
'----------------------------------------------------------
Private Sub Command1_Click()
Dim fso As Object
Dim oFile As Object
Dim i As Integer
Set fso = CreateObject("Scripting.FileSystemObject")
Set oFile = fso.CreateTextFile("c:\out.txt", True) 'True = overwrite
'Loop-part
For i = 0 To File1.ListCount - 1
oFile.WriteLine File1.List(i)
Next i
oFile.Close
End Sub
'----------------------------------------------------------
Søg
Alle emner
Teknologi
Udvikling
VB/Basic
Indstillinger
Spørgsmål
Tips
Usenet
Reklame
Statistik
Spørgsmål :
177821
Tips :
31980
Nyheder :
719565
Indlæg :
6410975
Brugere :
218912
Månedens bedste
Årets bedste
Sidste års bedste
Copyright © 2000-2026 kandu.dk. Alle rettigheder forbeholdes.