LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default prompt user to specify a directory

API is Application Programming Interface.

For SHBropwseForFolder, go to http://www.allapi.net/apilist/s.shtml and look
up the API.

An alternative way is:

Function aa()
Set sa = CreateObject("Shell.Application")
Set xx = sa.browseforfolder(0, "Select Folder", 0, 0)
aa = xx.Items.Item.Path
Set xx = Nothing
Set sa = Nothing
End Function


"mini" wrote:

Thanks for the reply. Could you please elaborate more on how to do it.
What's API?
Mini

"AA2e72E" wrote:

Try the API call:

Declare Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long

BrowseInfo is a structure as follows:

Private Type BrowseInfo
hWndOwner As Long
pIDLRoot As Long
pszDisplayName As Long
lpszTitle As Long
ulFlags As Long
lpfnCallback As Long
lParam As Long
iImage As Long
End Type



"mini" wrote:

Hi,
How do I prompt user to specify a directory? I don't want them to type in
the directory but instead they can browse around and select the correct path
just like in "Open File".
Thanks a lot,
Mini

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If prompt for user data Miree Excel Discussion (Misc queries) 0 August 19th 08 12:06 PM
save prompt for user exit, but no save prompt for batch import? lpj Excel Discussion (Misc queries) 1 February 25th 06 02:08 AM
Prompt user for a filename J S Excel Programming 3 April 8th 05 11:15 PM
Help with user prompt Rob Gould Excel Discussion (Misc queries) 5 March 14th 05 12:38 PM
Command Prompt to a Directory sailingdan[_2_] Excel Programming 0 June 23rd 04 05:08 PM


All times are GMT +1. The time now is 04:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"