Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Get a workbook to import data when openeing and export when closi.

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Get a workbook to import data when openeing and export when closi.

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

-----Original Message-----
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.
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Get a workbook to import data when openeing and export when closi.

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. :-)

" wrote:

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

-----Original Message-----
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.
.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Import and Export Text data yanks6rule Excel Discussion (Misc queries) 2 February 27th 09 05:01 PM
Import / export data Levi New Users to Excel 2 January 13th 09 06:14 AM
import/export data from a workbook ajn Excel Discussion (Misc queries) 1 December 8th 06 01:44 PM
data import and export in to access nuti Excel Discussion (Misc queries) 10 January 5th 06 07:09 PM
Create workbook for data export and then data import? Kevin G[_2_] Excel Programming 0 February 4th 04 04:10 AM


All times are GMT +1. The time now is 01:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"