Updating closed excel files


T

tanglk

I have a list of data, let say from A1 to A20.

I want to update them into A1 of 20 files namely file1.xls, file2.xls
..... file20.xls.

The A1 will goto file1.xls A1
A2 will goto file2.xls A1
......
A20 will goto file3.xls A1.


Is there any macro to update closed file's cells?


regards
 
Ad

Advertisements

A

Andy Wiggins

This file might be a help:
http://www.bygsoftware.com/examples/zipfiles/UsingSqlRequest.zip
It's in the "Excel with Access Databases" section on page:
http://www.bygsoftware.com/examples/examples.htm

This workbook demonstrates how to get data direct from an MS Access table,
or from an open or closed MS Excel workbook using the workbook function
SQL.REQUEST.

Recently updated to show the use of SQL.REQUEST in the same workbook.

The code is open and commented.

The nice thing about SQL.REQUEST is that you can structure it to use
replacable filenames parameters (the "missing" feature of INDIRECT), and you
can also run UPDATE queries which will update data in closed Excel files.
The downside is that it's slow.

--
Regards
-
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy
 

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

Top