View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jason Lepack Jason Lepack is offline
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