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: 32
Default Browse for file and set initial folder to search

The code that you are using is for folders (directories) only.

Try the getopenfilename method:

Sub filetest()
Dim fileToOpen As Variant
fileToOpen = Application.GetOpenFilename("Text Files (*.txt), *.txt")
If fileToOpen < False Then MsgBox "Open " & fileToOpen
End Sub

--
HTHs Martin


" wrote:

Yes I want to find the file. I have used the dialog box but can you
specify a starting folder for it?


 
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
Browse for folder Steph[_6_] Excel Programming 1 December 8th 05 04:53 PM
Browse for folder - Jim Rech's MD Excel Programming 4 February 8th 05 10:29 PM
Jim Rech's Browse for Folder Keb[_2_] Excel Programming 0 July 14th 04 02:53 PM
Browse for folder MD Excel Programming 1 July 13th 04 01:23 PM
Browse For Folder start directory Todd Huttenstine Excel Programming 2 May 12th 04 02:24 PM


All times are GMT +1. The time now is 10:40 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"