Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I'm doing this with a vbScript file, I typically use the
"Scripting.FileSystemObject" to retrieve an appropriate parent folder or drive, depending on where I want to start. The "Shell.Application" object does offer a number of options other than the MyDocuments folder if you want to stick to what I've got. Here is a link to info on getting the path to various special folders: http://www.microsoft.com/technet/scr....mspx?mfr=true For some good information on using BrowseForFolder (written for script writers but easy to use in a VBA routine, check out: http://wsh2.freeweb.hu/ch12f.html Steve Yandl "tenlbham" wrote in message ... Excellent, that's almost it!!! Thanks. Question: this current browser object doesn't appear to give me the option to go up to parent folders, is there a way to change that? This is a different way of coding for me so I don't recognize how to change the various options. Although I did figure out that the "&H5" was a reference to My Documents (as changing it to H0-H9 set the directory to various locations), and "&H4001" is perhaps some sort of filter. I was able to get the browser to display NO files when I changed it to "&H1001" "Steve Yandl" wrote: Dim objShell Dim objFldr Set objShell = CreateObject("Shell.Application") Set objMyDocs = objShell.Namespace(&H5) pathMyDocs = objMyDocs.Self.Path On Error Resume Next Set objFldr = objShell.BrowseForFolder(0, "pick me", &H4001, pathMyDocs) If Not (objFldr Is Nothing) Then MsgBox objFldr.Items.Item.Path End If Set objFldr = Nothing Set objShell = Nothing "tenlbham" wrote in message ... Thanks, but this is a file picker. I cannot use it to select a folder. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What is the best method to add a date picker to a spreadsheet? | Excel Discussion (Misc queries) | |||
How can I clean the buffer from the folder picker? | Excel Programming | |||
how can I specific a folder with wildcard criteria and excel will import all the correct files in that folder? | Excel Programming | |||
Folder picker default - second attempt... | Excel Programming | |||
Folder picker: default to network share? | Excel Programming |