Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Wed, 28 Apr 2004, Robin Hammond wrote:
This is something I used a while back. I can't remember the original author ' Root folder = Desktop bInfo.pidlRoot = 0& Thanks Robin. It works fine. A nice enhancement though would be to control the root folder it opens with. Changing that line and giving it a string gets a type mismatch. Anyone know how to change it from Desktop to a specified folder as the root? Don <donwiss at panix.com. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don,
Reasonable question. I found a couple of answers in the groups from 1997 involving use of undocumented api calls in shell32, which are probably very unreliable, then got carried away and went looking for something else. It seems that there is a solution in the common controls replacement project he http://ccrp.mvps.org/ and look for the browse dialog server control. Hopefully that will give you more control. Robin Hammond www.enhanceddatasystems.com "Don Wiss" wrote in message ... On Wed, 28 Apr 2004, Robin Hammond wrote: This is something I used a while back. I can't remember the original author ' Root folder = Desktop bInfo.pidlRoot = 0& Thanks Robin. It works fine. A nice enhancement though would be to control the root folder it opens with. Changing that line and giving it a string gets a type mismatch. Anyone know how to change it from Desktop to a specified folder as the root? Don <donwiss at panix.com. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Don,
Don Wiss wrote: Thanks Robin. It works fine. A nice enhancement though would be to control the root folder it opens with. Changing that line and giving it a string gets a type mismatch. Anyone know how to change it from Desktop to a specified folder as the root? You can go to Stephen Bullen's page http://bmsltd.ie/MVP/Default.htm and look for BrowseForFolder.zip under Jim Rech. That one allows you to specify an initial directory. Alternatively, you can automate the Shell interface to do this: Sub test() Dim sh As Object Dim fol As Object Dim fi As Object Set sh = CreateObject("Shell.Application") Set fol = sh.BrowseForFolder(0, _ "Select Folder", 0, "C:\") If Not fol Is Nothing Then Set fi = fol.ParentFolder.ParseName(fol.Title) If Not fi Is Nothing Then MsgBox fi.Path Else MsgBox fol.Title End If Set fol = Nothing Else MsgBox "no folder selected" End If End Sub -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Robin. It works fine. A nice enhancement though would be to control
the root folder it opens with. Changing that line and giving it a string gets a type mismatch. Anyone know how to change it from Desktop to a specified folder as the root? Don <donwiss at panix.com. You could use the Shell32.dll See here http://www.xcelfiles.com/Shell32_00.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
file browsing - autocomplete | Excel Discussion (Misc queries) | |||
Browsing for a folder in "Look in:" | New Users to Excel | |||
Browsing for a folder in "Look in:" | Setting up and Configuration of Excel | |||
Browsing for a folder in "Look in:" | Excel Discussion (Misc queries) | |||
Browsing to URL and reading contents | Excel Programming |