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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting on Enumerated Drives

Status
Not open for further replies.

WalleyeGuy

Technical User
Oct 18, 2007
44
US
I have a logon script, that of course maps network drives...it pops up an IE HTA Window and displays a summary.
I display an enumerated collection of the network drive mappings. How can I get that display to show the drives sorted alphabetically?

Code I'm using is below:

Dim i,objDrives

'Enumerate & Display Network Drive Mappings
Set objDrives = objNetwork.EnumNetworkDrives
' On Error Resume Next
showIE "strYellow", "<p><b><u>Network Drive Mapping:</b></u><br>"

For i = 0 to objDrives.Count - 1 Step 2
showIE "strYellow","Drive " & UCase(objDrives.Item(i)) & " maps to " & UCase(objDrives.Item(i+1)) & "<br>"
Next


I'm sure there has been a post or a FAQ created on this; however, I guess I just am not using the correct search criteria, as I cannot find the answer here (which is not normal).

Thanks Ahead of Time All
 
before displaying the information add it to an array (bubble sort or something similar), disconnected recordset, or .NET array and sort the information and then display it.

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
I knew it'd be something I was overlooking.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top