Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default NONE

bw,

Dim TheFileName

ChDir "c:\"
TheFileName = Application.GetOpenFilename("Text Files (*.txt), *.txt")

Use ChDir "c:\folder1\folder2"
to get to a particular folder

steve

"bw" wrote in message
...
I have the following two statements (among others, of course):

TheFileName = Application.GetOpenFilename("Text Files (*.txt), *.txt")

Workbooks.OpenText Filename:=TheFileName, Origin:=xlWindows, _
StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=myArray

I would like the default directory to begin looking in to be C:\

I have tried the following with no success:

TheFileName = Application.GetOpenFilename("Text Files (*.txt),

C:\.txt")

Thanks,
Bernie




 
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



All times are GMT +1. The time now is 10:56 PM.

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"