W
wel
I need to work between 3 different excel workbooks. I enter the
location path for 2 of the workbooks in a cell and define a name for
each of them.
I can then open the workbook if the filename changed simply by
changing in the cell that is defined.
Windows("BOOK1.xls").Activate
Sheets("sheet 1").Select
Loc1 = Range("path1")
Workbooks.Open Filename:=loc1
Windows("BOOK1.xls").Activate
Sheets("sheet 1").Select
Loc2 = Range("path2")
Workbooks.Open Filename:=loc2
How do i make use of the defined name to activate the workbook to work
on? the whole idea is something like this:
Windows("loc1").Activate
location path for 2 of the workbooks in a cell and define a name for
each of them.
I can then open the workbook if the filename changed simply by
changing in the cell that is defined.
Windows("BOOK1.xls").Activate
Sheets("sheet 1").Select
Loc1 = Range("path1")
Workbooks.Open Filename:=loc1
Windows("BOOK1.xls").Activate
Sheets("sheet 1").Select
Loc2 = Range("path2")
Workbooks.Open Filename:=loc2
How do i make use of the defined name to activate the workbook to work
on? the whole idea is something like this:
Windows("loc1").Activate