Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default CSV Import - user to select file

To all,

I have recorded a macro that imports a csv file into my worksheet.
However the file selected is 'hard coded' into the macro. Is there any
way that I can get this to change depending on which file the user
wants to select to open.

Thanks

Joseph Crabtree

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default CSV Import - user to select file

sInputFile = Application.GetOpenFilename("Text files, *.txt", , "Select
your text file", , False)
If sInputFile = "False" Then
MsgBox "Import cancelled at user request."
Exit Sub
End If

joecrabtree wrote:
To all,

I have recorded a macro that imports a csv file into my worksheet.
However the file selected is 'hard coded' into the macro. Is there any
way that I can get this to change depending on which file the user
wants to select to open.

Thanks

Joseph Crabtree


Reply
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
open file dialog-select file-import worksheet Divinedar Excel Programming 1 January 16th 04 07:13 PM
Import File with browse and select (even from Pocket PC?) Brett9 Excel Programming 3 November 4th 03 08:36 AM
Prompt user to select file with default file selected dialog Bruce Cooley Excel Programming 0 September 15th 03 06:43 AM
Prompt user to select file with default file selected dialog Bob Phillips[_5_] Excel Programming 0 September 14th 03 09:22 PM
Prompt user to select file with default file selected dialog Bob Phillips[_5_] Excel Programming 0 September 14th 03 09:19 PM


All times are GMT +1. The time now is 06:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"