Public Function Add ( FileName as string , FilePath as string) if Not Treeview1.nodes ( FilePath & "" & FileName ) Is Nothing Then MsgBox "Noeux deja existant " Exit Function End If Treeview1.Nodes.Add FilePath, tvwchild , Key:=FilePath & "" & FileName , Text:=FileName End Function Private Sub TreeView1_NodeClick ( Node as Node ) Msgbox "Noeud Selectionné : " & Node.Key End Sub
a = "MonFichier.ext" a= left$ ( a , instrrev ( a , ".")-1)
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionimportfilename:=File1.Path & "" & File1.List(File1.ListIndex)
strItem = File1.List(ilist) If SendMessage(List1.hwnd, _ LB_FINDSTRING, _ -1&, _ ByVal strItem) = LB_ERR Then For ilist = 0 To File1.ListCount - 1 If (File1.Selected(ilist)) Then List1.AddItem Left$(strItem, InStrRev(strItem, ".") - 1) Set mapframe1 = shapes.addbasemap(importfilename:=File1.Path & "" & strItem) mapframe1.Overlays.Item(1) = Left$(strItem, InStrRev(strItem, ".") - 1) Next ilist Else mouk = MsgBox("File Name already added!!!", vbOKOnly) End If
<s>rItem = File1.List(ilist)</s> If SendMessage(List1.hwnd, _ LB_FINDSTRING, _ -1&, _ ByVal strItem) = LB_ERR Then For ilist = 0 To File1.ListCount - 1 rItem = File1.List(ilist) If (File1.Selected(ilist)) Then List1.AddItem Left$(strItem, InStrRev(strItem, ".") - 1) Set mapframe1 = shapes.addbasemap(importfilename:=File1.Path & "" & strItem) mapframe1.Overlays.Item(1) = Left$(strItem, InStrRev(strItem, ".") - 1) Next ilist Else mouk = MsgBox("File Name already added!!!", vbOKOnly) End If