Can Macro command to open files?
Private Sub Workbook_Open()
ChDir "C:\Documents and Settings\Owner\Desktop\junk"
Workbooks.Open Filename:= _
"C:\Documents and Settings\Owner\Desktop\junk\Q1.xls"
Windows("NAMES.xls").Activate
End Sub
This goes in the NAMES.xls workbook code area.
Adjust the path to suite.
--
Gary''s Student - gsnu200761
"Berj" wrote:
Hi all,
can anybody help me with this?
I need a command to add at the beginning of a macro which can be executed
when my Excel file NAMES.XLS is opening. The macro should be part of NAMES.XLS
This command should open another file named Q1.XLS
The Result: when I open NAMES.XLS, the other file, Q1.XLS must be opened
with it too. Then NAMES.XLS be the active file once again.
Thanks in advance,
Berj
|