Get a workbook to import data when openeing and export when closi.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I get excell to import data from a closed workbook. Then when changes
have been made, export and save the data to the workbook the data came from,
overwriting what is contained in it.
 
why not just open the closed WB with code, make all the
changes with code the save and close the WB with code.

ChDir "S:\PUBLIC\Some"
Workbooks.Open Filename:="\\data\PUBLIC\youfile.xls"
put code to make changes goes here
ActiveWorkbook.Save
ActiveWorkbook.Close
 
I cant do that as the code that is in the current workbook is written in a
way that it has to be the only one open. Otherwise it falls over with Run
Time errors. If it where that easy I would not be bald from pulling my hair
out. :-)
 

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