open *.csv file as *.xls makro

  • Thread starter Thread starter kajro
  • Start date Start date
K

kajro

How to ask user about path and open synteza.csv file as column separate
view
like synteza.xls?

Workboks.Open open it only as csv.

I ask to makro of course.

Thanks and sory for fatal English
 
Try this:

Dim fileToOpen As Variant
fileToOpen = Application.GetOpenFilename("CSV Files (*.csv), *.csv")
If fileToOpen = False Then
' user pressed cancel or some other error deal with it
End If
Workbooks.OpenText Filename:=fileToOpen, DataType:=xlDelimited, Comma:=True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top