Hi
I have a doubt with this procedure. I have a treeview and i want to show
folders and files like the Windows explorer. To do this, I define next
recursive procedure:
Public Function F_CalculaArbol(s_ruta As String, s_clavepadre As String) As
Boolean
Dim clave As String
Dim d1 As String
d1 = Dir(s_ruta, vbDirectory)
Do While d1 <> ""
If d1 <> "." And d1 <> ".." Then
If (GetAttr(s_ruta & d1) And vbDirectory) = vbDirectory Then 'Is
a Folder
clave = "C" & l_contador
Set nodX = Form1.arbol.Nodes.Add(s_clavepadre, tvwChild,
clave,d1)
l_contador = l_contador + 1
x = F_CalculaArbol(s_ruta & d1 & "\", clave)
Else 'Is a file
clave = "A" & l_contador
Set nodX = Form1.arbol.Nodes.Add(s_clavepadre, tvwChild,
clave,d1)
l_contador = l_contador + 1
End If
End If
d1 = Dir
Loop
F_CalculaArbol = True
End Function
This function returns next error :
Call to a procedure or arguments no valids
Can you help me?
Thanks anyway.