Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, July 9, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Administration Forums - General Administration
Forum to discuss general administration topics for SalesLogix (including LAN & remote topics). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to General Administration | New ThreadView:  Search:  
 Author  Thread: Directory Selection feature in VB Script...??
Richa
Posts: 45
 
Directory Selection feature in VB Script...??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Aug 07 12:20 AM
Hi,

Is there any feature in VB Script that provides directory selection.....something similar to DirListBox in VB...??
If not then how can directory selection functionality be implemented in VB Script?
Can someone pls rply at the earliest..??
TIA.

Regards,
Richa
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Directory Selection feature in VB Script...??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Aug 07 12:55 AM
Are you looking for a control already built or for means to build your own control(s)?

You could use a Tree Control (for Folders) and a Combo box (for Drives) inside an SLX form, load them with your drive/folder structure and then let the user select a folder from there.
[Reply][Quote]
Richa
Posts: 45
 
Re: Directory Selection feature in VB Script...??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Aug 07 1:32 AM
Hi Raul,

Actually we are looking for a control already built...does there exist something like this?

Also, if we build a tree structure...how can we load it with drive/folder structure...bacause that structure would vary from system to system.

Thanks,
Richa
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: Directory Selection feature in VB Script...??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Aug 07 8:15 AM
See some sample code below, read comments

Dim objFS
Dim objFL
Dim objDrives
Dim drive
Dim fl

Set objFS = CreateObject("Scripting.FileSystemObject")
Set objDrives = objFS.Drives
For Each drive In objDrives
'Load drives into a Combo box or as root items in the tree
wscript.Echo "Drive: " & drive.Path
On Error Resume Next 'Test if drive is accessible
Set objFL = objFS.GetFolder(drive.Path & "\")
for each fl in objFL.SubFolders
'Load name into tree as node
WScript.Echo fl.Name
'Check for Subfolders
'Probably better using a recursive function, this is just code for illustration of what can be done.
for each sfl in fl.SubFolders
'Load name into tree as subnode
WScript.Echo sfl.Name
Next
Next
Next
Set objDrives = Nothing
Set objFS = nothing
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Directory Selection feature in VB Script...??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Aug 07 12:42 PM
See http://saleslogixblog.com/rfarley/archive/2007/08/08/37945.aspx
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Directory Selection feature in VB Script...??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Aug 07 12:43 PM
Quote:
Originally posted by Raul A. Chavez

You could use a Tree Control (for Folders) and a Combo box (for Drives) inside an SLX form, load them with your drive/folder structure and then let the user select a folder from there.


No need to go to all that trouble. See http://saleslogixblog.com/rfarley/archive/2007/08/08/37945.aspx for a way to invoke the standard Windows Browse for Folder dialog in SalesLogix.
[Reply][Quote]
Richa
Posts: 45
 
Re: Directory Selection feature in VB Script...??Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Aug 07 11:58 PM
Thanks Raul and Ryan for the inputs.

We've now used SLX Common Dialogue Library -> Open Dialogue, alongwith Microsoft Common Dialogue Control...and this seems to have solved our problem

But still thanks a lot for that useful piece of info.

Regards,
Richa.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/9/2025 12:50:09 PM