Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some code that opens three workbooks simultaneously. Two workbooks
will contain source data while the third is the workbook to which I want to copy source data. The destination workbook is not really a problem as it will always have the same name so I can use that in the code. The two workbooks with the source data will have names that change from week to week. The name will be something like "Workbook Name_mmddyy" - the date being the date on which the file was created. I will need to activate each of these source workbooks in order to copy data. How do I reference the workbooks when I don't have a name? Thanks- |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You will need to be creative here. I don't have all your details, but you
could store all your source files in a separate folder. Then code an array to return all the file names contained in that folder and process them. Once they have been processed, move them to an archive folder, delete them, or alter their name slightly, like add a 1 at the beginning of the file name. If the latter method is used, then set your code not to process any file with a leading 1 in the file name. Very do-able. Hope this helps. "FinChase" wrote: I have some code that opens three workbooks simultaneously. Two workbooks will contain source data while the third is the workbook to which I want to copy source data. The destination workbook is not really a problem as it will always have the same name so I can use that in the code. The two workbooks with the source data will have names that change from week to week. The name will be something like "Workbook Name_mmddyy" - the date being the date on which the file was created. I will need to activate each of these source workbooks in order to copy data. How do I reference the workbooks when I don't have a name? Thanks- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select a variable range | Excel Worksheet Functions | |||
select cell by variable name | Excel Discussion (Misc queries) | |||
Use a Variable to select a range | Excel Discussion (Misc queries) | |||
Range("C9:V9").Select ==> changing the 9 to a variable | Excel Worksheet Functions | |||
Select other workbook to select data in a macro. | Excel Programming |