-
Select file names
Hi everyone. I'm using a common dialog control to select filenames. The problem is that they must have multiple selection option.
When I try to parse the FileName property I get this weird character "" I dunno what to use to compare this special character. The code follows
files = dlgSelArchivo.FileName
n = Len(files)
For j = 1 To n
char = Mid(files, j, 1)
If char = Null Then
flag = 1
ElseIf char <> Null And flag >= 1 Then
final = final + char
ElseIf char = Null And flag >= 1 Then
final = final + "; "
End If
Next j
Any replies will be appreciated.
Thank You :wave:
-
If char = Null Then
this is not fine in Vb6
you must code differently:
suppose char is a variant, you can code:
if isEmpty(char) then
in case you did not assigned anithing
or
if isNUll(char) then
in case you read from a db a null field
-
Thanx cimperiali. I'll try that :)
-
Seems to me all that code can be replaced by something like this:
Files = Replace(Files, Chr(1), "; ")
-
Well, it didn't work :cry:, but I found another way around. I used vbCharNull instead of IsEmpty and it worked :)
Sometimes MSDN isn't as bad as it looks :lol:
Anyway, thanx Cimperiali :wave:
-
Oh... I was just editing the post and hadn't read your reply WizBang. I think I'll try that
Thanx :wave: