Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import data from CSV file 1

Status
Not open for further replies.

smithcza

Programmer
Jan 7, 2005
80
ZA
Hi

Can this be done

I would like to open a CSV file , using

With Application.Dialogs(xlDialogOpen)
.Show
End With

copy all data in it, and paste it to my current Excell spreadsheet and closing (without saving the source CVS file)

Easy enough but the problem is that the filename of the CSV file name and active excel workbook I want to paste into will be different everytime the macro runs.

Can anybody help me please.

Regards,

Christiaan
 
Check out Chip's site, he has coded how to do this very nicely


if you want this code always available, just put it in your personal workbook so it is always available. Another option is put the code in any workbook you desire but create a toolbar button to run. The button will remember the workbook where the macro is stored and open it to run the macro.

Paul D
[pimp] pimpin' aint easy
 
Hi PaulRD

Thanks a million, it works like a dream.

Cheers,

Smithcza
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top