PC Review


Reply
Thread Tools Rate Thread

CSV Import - user to select file

 
 
joecrabtree
Guest
Posts: n/a
 
      13th Dec 2006
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 With Quote
 
 
 
 
Jason Lepack
Guest
Posts: n/a
 
      13th Dec 2006
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import Excel File into Access DB where user can specify file name andcell range to import ssa Microsoft Access External Data 1 18th May 2011 01:18 AM
User Select File on Import External Data L.Mathe Microsoft Excel Programming 3 14th Mar 2010 09:07 PM
Allow User to Select Path of Import File =?Utf-8?B?RGF2ZSBD?= Microsoft Access External Data 3 29th Sep 2005 02:02 PM
How do I create a file dialog box to select a file to import? =?Utf-8?B?U2NvcnBpb1JD?= Microsoft Access 4 20th Nov 2004 11:27 AM
open file dialog-select file-import worksheet =?Utf-8?B?RGl2aW5lZGFy?= Microsoft Excel Programming 1 16th Jan 2004 07:13 PM


Features
 

Advertising
 

Newsgroups
 


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