What is wrong with this ?
I'm not always getting an subscript out of range, but when Filelistbox File1
contains these files:
uwvGAK sollicitatie.doc
cv
BLABLAR.DOC
cv.doc
brief16-07-2002.DOC
uitkeringsdeskundige.DOC
gembel.doc
h&m.doc
vvbs.doc
uszoterug.doc
CV2.doc
belast2001.doc
openweb.DOC
uszoterug2.doc
upc+deurwaarder.doc
verzoekdiemen.doc
upc+deurwaarder2.doc
groeneland.doc
belast2001c.doc
Daisycon.doc
belast2001b.doc
belkwijt_bijl.doc
openadministratief.DOC
belastinfo.doc
uszooverzicht.doc
speciaal
lol.txt
dreizen.doc
Google.doc
Google.txt
locuscentre.doc
roclelystad.doc
it goes wrong at nFile = nFile & Text3.Text & Asperge & Text4.Text & "." & arrFil(1).
While other directories aren't giving problems.
What am I doing wrong and what can I do to solve it ?
Private Sub Command1_Click()
Dim i As Integer, arrFil() As String, Lastokfile As String
Dim sFile As String, nFile As String, antw As Integer
Dim Asperge As Integer, Dezedir As String, myfile As String
Dim bestandsnummer As Integer, FDS As String, FS As String
If Text2.Text = "" Then Text2.Text = "1"
Asperge = Text2.Text
For i = 0 To File1.ListCount - 1
arrFil = Split(File1.List(i), "."
If Right$(File1.Path, 1) <> "\" Then
sFile = File1.Path & "\" & File1.List(i)
Else
sFile = File1.Path & File1.List(i)
End If
nFile = Dir2.Path
If Right$(Dir2.Path, 1) <> "\" Then
nFile = nFile & "\"
End If
nFile = nFile & Text3.Text & Asperge & Text4.Text & "." & arrFil(1)
<<<<<<<<<< rest of my lines >>>>>>>>>
I'm not always getting an subscript out of range, but when Filelistbox File1
contains these files:
uwvGAK sollicitatie.doc
cv
BLABLAR.DOC
cv.doc
brief16-07-2002.DOC
uitkeringsdeskundige.DOC
gembel.doc
h&m.doc
vvbs.doc
uszoterug.doc
CV2.doc
belast2001.doc
openweb.DOC
uszoterug2.doc
upc+deurwaarder.doc
verzoekdiemen.doc
upc+deurwaarder2.doc
groeneland.doc
belast2001c.doc
Daisycon.doc
belast2001b.doc
belkwijt_bijl.doc
openadministratief.DOC
belastinfo.doc
uszooverzicht.doc
speciaal
lol.txt
dreizen.doc
Google.doc
Google.txt
locuscentre.doc
roclelystad.doc
it goes wrong at nFile = nFile & Text3.Text & Asperge & Text4.Text & "." & arrFil(1).
While other directories aren't giving problems.
What am I doing wrong and what can I do to solve it ?
Private Sub Command1_Click()
Dim i As Integer, arrFil() As String, Lastokfile As String
Dim sFile As String, nFile As String, antw As Integer
Dim Asperge As Integer, Dezedir As String, myfile As String
Dim bestandsnummer As Integer, FDS As String, FS As String
If Text2.Text = "" Then Text2.Text = "1"
Asperge = Text2.Text
For i = 0 To File1.ListCount - 1
arrFil = Split(File1.List(i), "."
If Right$(File1.Path, 1) <> "\" Then
sFile = File1.Path & "\" & File1.List(i)
Else
sFile = File1.Path & File1.List(i)
End If
nFile = Dir2.Path
If Right$(Dir2.Path, 1) <> "\" Then
nFile = nFile & "\"
End If
nFile = nFile & Text3.Text & Asperge & Text4.Text & "." & arrFil(1)
<<<<<<<<<< rest of my lines >>>>>>>>>