Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Treeview Component - show full path, not drive letter

Status
Not open for further replies.

rossmcl

Programmer
Apr 18, 2000
128
I use the following to populate my TreeView. Unfortunately I want to show the full server path mapped to a drive not just the drive letter. Anyone know how/if this can be done?
Thanks
Ross
#######################################################


Set moFSO = New FileSystemObject

Dim n As Node
Dim dDrives As Drives
Dim dDrive As Drive

Dim sCompName As String

sCompName = GetUserID

tvTreeView.Nodes.Add , , "MYCOMPUTER", sCompName, "MYCOMPUTER"

Set dDrives = moFSO.Drives

For Each dDrive In dDrives
Set n = tvTreeView.Nodes.Add("MYCOMPUTER", tvwChild, dDrive.DriveLetter & ":", dDrive.DriveLetter & ":", "DRIVE")
Next

tvTreeView.Nodes("MYCOMPUTER").Expanded = True
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top