LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default What is the syntax for the open workbook in a Macro?

I have a workbook with multiple sheets that gets updated weekly. The file
has a new name for each week. I want to copy selected data from a few sheets
in the workbook with the unique names into a static workbook with a constant
name that is used to import data into an access database. I recorded a maco
in the template that the source weekly workbooks are created from that once
opened, will open the target workbook clear out all old data and copy in the
desired data then save and close the workbook with the constant name. The
problem I have is the recorded maco is using the path and file name of the
source workbook from when the macro was first recorded. This becomes invalid
once a new week workbook is created and the process needs to be repeated
since the file name has changed. How can I modify the recorded macro to use
the data in the already opened workbook to copy into the other so the name
will never change?
 
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
Run a macro when I open a workbook CraigJ Excel Discussion (Misc queries) 1 June 13th 07 04:04 PM
Open workbook macro- find correct month to open? buzzharley[_10_] Excel Programming 8 July 8th 06 04:30 AM
Macro syntax to open file in current explorer folder [email protected] Excel Discussion (Misc queries) 4 January 11th 06 12:07 PM
Macro syntax to open file in current explorer folder [email protected] Excel Programming 4 January 11th 06 12:07 PM
open workbook from a macro and continue this macro afterwards Chris De Luyck Excel Programming 3 December 19th 05 12:12 PM


All times are GMT +1. The time now is 01:17 PM.

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"