LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default GetOpenFilename

1. I am able to use Getopenfilename to allow the user to select a file to open.

a.. fileToOpen = Application _
.GetOpenFilename("Text Files (*.txt), *.txt")
If fileToOpen < False Then
MsgBox "Open " & fileToOpen
End If


2. What I would really like to do is allow the user to select the file (a TXT file), but then get the same macro to apply predefined settings to the "Text Import wizard" i.e what the data type is, what the delimiter is and what the Column data format is. I have recorded the macro to open a file with the required settings, but the recorded macro obviously specifies the file name used in the recording. The macro line also seems to be one continuous line. How do I split it into 2 lines, one for filename and one for settings?

Any help would be greatly appreciated.

Thanks in advance

Craig
 
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
GetOpenFileName with F*.txt DRK Excel Programming 6 June 7th 05 12:45 PM
GetOpenFileName help Leith Ross[_12_] Excel Programming 0 April 8th 05 10:14 PM
GetOpenFilename Chodu Excel Programming 1 May 17th 04 06:17 PM
GetOpenFileName Greg Bloom Excel Programming 2 February 9th 04 04:09 PM
getopenfilename inquirer Excel Programming 1 December 3rd 03 11:37 AM


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