View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Francis Hookham Francis Hookham is offline
external usenet poster
 
Posts: 125
Default Macro to open another file

A template, ADR.xlt, produces a single sheet workbook named ADR1.xls which
has macros which formats data imported from a file named
AgedDebtorReport.csv

So far an report file has to be opened, data selected ('Select all') and
copied, then the ADR1.xls activated and the data pasted in

It is not difficult to record and refine a macro to do this with the file
path included, BUT the template will be moved to another machine and a
different AgedDebtorReport.csv comes in each day, albeit with identical name

On the basis that both ADR1.xls and AgedDebtorReport.csv will alwsys be in
the same folder I have tried cutting down

"Workbooks.Open Filename:= _
"D:\Documents and Settings\Francis\`Tyler\AgedDebtorReport.csv"
to
Workbooks.Open Filename:="AgedDebtorReport.csv"

which seems to work until I start or change the report for a new one

Any suggestions please

Francis Hookham