import CSV file at location D7

  • Thread starter Thread starter lothario
  • Start date Start date
L

lothario

Hi,

I have a CSV file "today1.csv" that I would like to import into my
workbook "wb1" in sheet "today1" at cell "D7".

Can you give me the VBA macro that I can put behind my "Load
today1.csv" button?

So everytime I click this "Load today1.csv" button:
a. All data in the range "D7:Z400" is initialized to 0.
b. The csv file is loaded starting at cell "D7".

Thanks.
 
Turn on the macro recorder (tools=>macro=>Record a new macro) then do

Data=>Get External Data=> Import Text file
and import your file.

This should give you the basic code you need. Then you can clean it up and
add specifics.
 
Back
Top