Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / August 2007

Tip: Looking for answers? Try searching our database.

Open Folder Help required

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ayo - 30 Aug 2007 03:04 GMT
I was wondering if VBA as a method that allows you to open a folder directly
use the Open File Dialog.
For example if I use this code:
Application.GetOpenFilename("Text Files (*.txt), *.txt")
I want aspecific folder to be opened in the Open file dialog.
Jim Cone - 30 Aug 2007 04:38 GMT
Give this a try...

With Application.FileDialog(msoFileDialogFolderPicker)
       .InitialFileName = "C:\"     'Specify folder path
        If .Show = -1 Then
           'do it
        Else
          'don't do it
        End If
End With

Helpful advice here...
http://www.cpearson.com/excel/newposte.htm

Signature

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)

"Ayo"
wrote in message
I was wondering if VBA as a method that allows you to open a folder directly
use the Open File Dialog.
For example if I use this code:
Application.GetOpenFilename("Text Files (*.txt), *.txt")
I want aspecific folder to be opened in the Open file dialog.

Ayo - 30 Aug 2007 05:16 GMT
Thanks a million Jim. This is exactly wjat I was look for. Thank you very much.

> Give this a try...
>
[quoted text clipped - 9 lines]
> Helpful advice here...
> http://www.cpearson.com/excel/newposte.htm
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.