marc660
Messages postés171Date d'inscriptionjeudi 15 avril 2004StatutMembreDernière intervention18 juillet 2007
-
11 nov. 2005 à 16:02
marc660
Messages postés171Date d'inscriptionjeudi 15 avril 2004StatutMembreDernière intervention18 juillet 2007
-
12 nov. 2005 à 17:08
Bonjour
Voila jai un gros problème impossible a résoudre.
Je voudrais si sais possible avec un CommonDialog de faire un multi select pour pouvoir ouvrir plusieurs fichiers en même temp. Et les afficher dans un treeview.
Voilà mon code pour louverture dun fichier et laffiché dans un treeview.
'Code
Private Sub Ajout_Click()
Dim oNode As Node
Dim tString() As String
Dim i As Integer
With Dialog1
.Filter = _
"Tous(*.*)|*.*"
.FilterIndex = 1
.ShowOpen
If Not Len(.FileName) = 0 Then
tString = Split(.FileName, "")
Set n = Tree.SelectedItem.Child
While Not n Is Nothing
If n.Text = tString(UBound(tString)) Then
Exit Sub
End If
Set n = n.Next
Wend
If (Tree.SelectedItem.Tag <> "") Then Set Tree.SelectedItem = Tree.SelectedItem.Parent
Set oNode = Tree.Nodes.Add(Tree.SelectedItem.Index, tvwChild, , tString(UBound(tString)), 0, 0)
marc660
Messages postés171Date d'inscriptionjeudi 15 avril 2004StatutMembreDernière intervention18 juillet 2007 12 nov. 2005 à 10:34
Bonjour
Merci pour vos repose
Voila je narrive pas a intégrer le résultat dans un TreeView
Avez vous une solution svp
Et merci d'avance
Dim tablo() As String
Dim l As Long
Dim oNode As Node
With CommonDialog1
.Flags = &H200 Or &H80000
.InitDir = "C:"
.Filter = "(*.*)|*.*"
.ShowOpen
tablo = Split(.FileName, vbNullChar, , vbTextCompare)
For l = LBound(tablo) To UBound(tablo)
Set oNode = DirTree.Nodes.Add(DirTree.SelectedItem.Index, tvwChild, , tablo(UBound(tablo)), 0, 0)
Next l
End With