View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy Patrick Molloy is offline
external usenet poster
 
Posts: 1,049
Default Import Data, using a command line switch


try this

Sub OpenAFile()

Dim fname As String

fname = Application.GetOpenFilename(("Text Files (*.csv), *.csv"))

Workbooks.Open fname

End Sub

at least on my pc, Vista and excel 2003, it just opens without any wizardry

"§ Balisteor." <§ wrote in message
...
Hello all.

I would like to know if it is possible to open a comma delimited text file
without going through the import data wizard.
I want to be able to use a command line switch or if there are default
import settings that I can set so that when i have Excel open the text
file
it will import it correctly without any user input.

Thank you for you reading :D