PC Review


Reply
Thread Tools Rate Thread

Browse for folder (but with shortcuts)

 
 
rob
Guest
Posts: n/a
 
      1st Nov 2009
I would like to select a folder and use BrowseForFolder.
This works fine but does not show the shortcuts so that I browse through
these.

Anyone an idea that allows me to work with shortcuts as well to get to my
final directory destination?


 
Reply With Quote
 
 
 
 
rob
Guest
Posts: n/a
 
      2nd Nov 2009
Thanks but how does this work in VB (in an excel macro)?



"joel" wrote:

>
> Below is the method using the Win32 DLL. If htis can't get what you are
> looking for then you would have to create you own listbox and put the
> w\items you are looking for into the list box.
>
> Here is the microsoft website library definition.
>
> 'SHBrowseForFolder Function ()'
> (http://msdn.microsoft.com/en-us/library/bb762115(VS.85).aspx)
>
> There is a paragraph in the above website the talks about SHORTCUT.
>
>
> Private Type BROWSEINFO
> hOwner As Long
> pidlRoot As Long
> pszDisplayName As String
> lpszTitle As String
> ulFlags As Long
> lpfn As Long
> lParam As Long
> iImage As Long
> End Type
>
> Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias _
> "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) _
> As Long
>
> Sub test()
>
> Dim bi As BROWSEINFO
> Dim dwIList As Long
>
> dwIList = SHBrowseForFolder(bi)
>
> End Sub
>
>
> --
> joel
> ------------------------------------------------------------------------
> joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
> View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149959
>
> <a href="http://www.thecodecage.com">Microsoft Office Help</a>
>
> .
>

 
Reply With Quote
 
rob
Guest
Posts: n/a
 
      2nd Nov 2009
Thanks, but how does this work in VB (excel macro)?

"joel" wrote:

>
> Below is the method using the Win32 DLL. If htis can't get what you are
> looking for then you would have to create you own listbox and put the
> w\items you are looking for into the list box.
>
> Here is the microsoft website library definition.
>
> 'SHBrowseForFolder Function ()'
> (http://msdn.microsoft.com/en-us/library/bb762115(VS.85).aspx)
>
> There is a paragraph in the above website the talks about SHORTCUT.
>
>
> Private Type BROWSEINFO
> hOwner As Long
> pidlRoot As Long
> pszDisplayName As String
> lpszTitle As String
> ulFlags As Long
> lpfn As Long
> lParam As Long
> iImage As Long
> End Type
>
> Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias _
> "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) _
> As Long
>
> Sub test()
>
> Dim bi As BROWSEINFO
> Dim dwIList As Long
>
> dwIList = SHBrowseForFolder(bi)
>
> End Sub
>
>
> --
> joel
> ------------------------------------------------------------------------
> joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
> View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149959
>
> <a href="http://www.thecodecage.com">Microsoft Office Help</a>
>
> .
>

 
Reply With Quote
 
rob
Guest
Posts: n/a
 
      3rd Nov 2009
Joel, this is functioning but does NOT list my shortcuts to jump quickly to
my desired directories.
I am looking for a solution that also lists the shortcuts (and allows user
to doubleclick on it).

rob

"Simon Lloyd" wrote:

>
> *How to add and run a Macro*
> 1. *Copy* the macro
> 2. Open your workbook
> 3. Press the keys *ALT+F11* to open the Visual Basic Editor
> 4. Press the keys *ALT+I* to activate the *Insert menu*
> 5. *Press M* to insert a *Standard Module*
> 6. *Paste* the code by pressing the keys *CTRL+V*
> 7. Make any custom changes to the macro if needed at this time.
> 8. *Save the Macro* by pressing the keys *CTRL+S*
> 9. Press the keys *ALT+Q* to exit the Editor, and return to Excel.
>
> *To Run the Macro...*
> To run the macro from Excel, open the workbook, and press *ALT+F8* to
> display the *Run Macro Dialog*. Double Click the macro's name to *Run*
> it.
>
> rob;545832 Wrote:
> > Thanks, but how does this work in VB (excel macro)?
> >
> > "joel" wrote:
> >
> > >
> > > Below is the method using the Win32 DLL. If htis can't get what you

> > are
> > > looking for then you would have to create you own listbox and put the
> > > w\items you are looking for into the list box.
> > >
> > > Here is the microsoft website library definition.
> > >
> > > 'SHBrowseForFolder Function ()'
> > > ('SHBrowseForFolder Function ()'

> > (http://msdn.microsoft.com/en-us/library/bb762115(VS.85).aspx))
> > >
> > > There is a paragraph in the above website the talks about SHORTCUT.
> > >
> > >
> > > Private Type BROWSEINFO
> > > hOwner As Long
> > > pidlRoot As Long
> > > pszDisplayName As String
> > > lpszTitle As String
> > > ulFlags As Long
> > > lpfn As Long
> > > lParam As Long
> > > iImage As Long
> > > End Type
> > >
> > > Private Declare Function SHBrowseForFolder Lib "shell32.dll" Alias _
> > > "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) _
> > > As Long
> > >
> > > Sub test()
> > >
> > > Dim bi As BROWSEINFO
> > > Dim dwIList As Long
> > >
> > > dwIList = SHBrowseForFolder(bi)
> > >
> > > End Sub
> > >
> > >
> > > --
> > > joel
> > >

> > ------------------------------------------------------------------------
> > > joel's Profile: 'The Code Cage Forums - View Profile: joel'

> > (http://www.thecodecage.com/forumz/member.php?userid=229)
> > > View this thread: 'Browse for folder (but with shortcuts) - The Code

> > Cage Forums' (http://www.thecodecage.com/forumz/sh...d.php?t=149959)
> > >
> > > <a href="http://www.thecodecage.com">Microsoft Office Help</a>
> > >
> > > .
> > >

>
>
> --
> Simon Lloyd
>
> Regards,
> Simon Lloyd
> 'Microsoft Office Help' (http://www.thecodecage.com)
> ------------------------------------------------------------------------
> Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
> View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149959
>
> Microsoft Office Help
>
> .
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Browse for folder - not selecting folder Trish Smith Microsoft Excel Programming 8 18th Sep 2008 09:23 AM
How to browse folder starting from my application folder? =?Utf-8?B?RmVpIExp?= Microsoft C# .NET 3 2nd Nov 2004 03:06 PM
Re: Viewing Folder Shortcuts in Folder List Rick \Nutcase\ Rogers Windows XP General 0 27th Aug 2004 01:04 AM
Browse Folder ( Folder Options ) won't change after new selection marca Windows XP Security 0 14th Jul 2004 05:50 AM
Browse Folder dialog with option to make New Folder Bradley C. Hammerstrom Microsoft Access Getting Started 2 6th Jan 2004 07:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:08 PM.