|
-
Sep 16th, 2004, 01:11 PM
#1
Thread Starter
Addicted Member
GetOpenFileName problem (resolved)
Hey All,
I found this code (GetOpenFileName API) that Aaron Young wrote
for multi-selecting files.
click here
This code works great for selecting multiple files, but when I want
to select just one, I can't seem to figure out why it will not work.
Thanks for any help in advance,
Ron
BTW...I use VB5, and I found this nice Split function (I don't
remember, but Aaron might have written this too)...
Code:
Private Function Split2(ByVal sString As String, ByVal sSeparator As String) As Variant
Dim sParts() As String
Dim lParts As Long
Dim lPos As Long
lPos = InStr(sString, sSeparator)
While lPos
ReDim Preserve sParts(lParts)
sParts(lParts) = Left(sString, lPos - 1)
sString = Mid(sString, lPos + Len(sSeparator))
lPos = InStr(sString, sSeparator)
lParts = lParts + 1
Wend
If Len(sString) Then
ReDim Preserve sParts(lParts)
sParts(lParts) = sString
End If
Split2 = IIf(lParts, sParts, Array())
End Function
Last edited by rdcody; Sep 16th, 2004 at 05:08 PM.
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
|
Click Here to Expand Forum to Full Width
|