is there anyway to keep two separate excel files "grouped" ie always
associated with eachother. i have two models that i would always like
to open at the same time. the plan is to open them, then write a macro
that transfers data from one file to the next
any help would be greatly appreciated
RC- - 17 Jan 2008 17:03 GMT
You can link the two spreadsheets together, but the linking is not at a
workbook level but rather a cell by cell level...not sure if that is what
you are looking for. As for opening the two spreadsheets, you can put the
two files in the XLStart folder located in the system folder X:\Program
Files\Microsoft Office\OFFICE##\XLSTART, where X is the drive letter where
office is installed and ## is your office version.
Alternatively, you can create a macro that opens the other file upon opening
the first file. In the "source file", your macro code can call the cells
from the other file.
Unfortunatley, I can't give specific examples because I am not sure what the
requirements are.
HTH a little at least,
RC-
> is there anyway to keep two separate excel files "grouped" ie always
> associated with eachother. i have two models that i would always like
> to open at the same time. the plan is to open them, then write a macro
> that transfers data from one file to the next
>
> any help would be greatly appreciated
RC- - 17 Jan 2008 17:16 GMT
For opening a second file using a macro:
In a new Sub routine (in the source file) add the following code in a Module
or the ThisWorkbook object.
Sub OpenDestination()
Workbooks.Open Filename:= _
"PATH-TO-FILE\FILE-NAME.xls"
End Sub
Then, in the ThisWorkbook object in VBA Code view, create a new event named:
Private Sub Workbook_Open()
OpenDestination
'If you want to change focus to the source file, remove the comment
below
'Windows("Source.xls").Activate
End Sub
When the source file is opened, the destination file will automatically be
opened and focus will be placed on the destiation file unless the comment
above is removed.
HTH,
RC-
> is there anyway to keep two separate excel files "grouped" ie always
> associated with eachother. i have two models that i would always like
> to open at the same time. the plan is to open them, then write a macro
> that transfers data from one file to the next
>
> any help would be greatly appreciated
nyrunner - 17 Jan 2008 19:27 GMT
right, this is helpful, i wanted to "group" the two files so they will
always be together, as new versions are saved in new directories... i
want some way of always keeping the files together
]
> For opening a second file using a macro:
>
[quoted text clipped - 33 lines]
>
> - Show quoted text -
davegb - 17 Jan 2008 23:18 GMT
> right, this is helpful, i wanted to "group" the two files so they will
> always be together, as new versions are saved in new directories... i
[quoted text clipped - 45 lines]
>
> - Show quoted text -
Don't know of anyway to "group" them so they always open together. You
can create a "Workspace" which, when double-clicked, will open them
both. But you can still open them separately by double-clicking on the
individual file.
Gord Dibben - 17 Jan 2008 23:17 GMT
With both workbooks open.........File>Save Workspace.
Gord Dibben MS Excel MVP
>is there anyway to keep two separate excel files "grouped" ie always
>associated with eachother. i have two models that i would always like
>to open at the same time. the plan is to open them, then write a macro
>that transfers data from one file to the next
>
>any help would be greatly appreciated