I would like to get tree view using excel vba.I have many String likes this
/folderOne/fileOne
/folderTwo/fileThree
/folderOne/fileTwo
ok assuming your data is in Column A, try this:
Option Explicit
Sub test()
Dim rng As Range, cel As Range
Set rng = ThisWorkbook.Sheets("Sheet1").Range("A1", _
ThisWorkbook.Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Address)
rng.TextToColumns rng.Range("A1"), , , , , , , , True, "/"
Set rng = ThisWorkbook.Sheets("Sheet1").Range("B1", _
ThisWorkbook.Sheets("Sheet1").Range("B" & Rows.Count).End(xlUp).Address)
For Each cel In rng
If cel.Row <> 1 Then If cel.Value = cel.Offset(-1, 0).Value Then cel.ClearContents
Next
End Sub
Hope this get's you started somehow.