Import Data

  • Thread starter Thread starter John Sutton
  • Start date Start date
J

John Sutton

My apologies if this is in the wrong spot, I could find no obvious
place for it.

Is it possible to import a .CSV file into an existing .XLS? I want to
bring the data into a spreadsheet inside a macro, but I don't want to
have to use the file name of the spreadsheet, only the name of the
..CSV file. That way, I can use the same macro no matter what the file
is named.

Another alternative, is there a way to get the name of the spreadsheet
within the VB code, then I could just interrogate the spreadsheet for
it's name, open the .CSV file and then do my copy/paste operation to
get the data where I want it.

John
KBS
 
Boy, are you lost. This newsgroup is for Word, not for Excel. Try
asking in the microsoft.public.excel.programming newsgroup.

To get you started, read the Excel VBA help topics on the
ActiveWorkbook and ActiveSheet objects.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
Back
Top