A
alan82
Hi,
I am using the code names method to reference sheets from a Macro,
this works great when I have only one workbook open.
But, I would like to copy all the sheets into a new workbook, do some
stuff with the data in the new workbook (my problem is here!), save
the new workbook and then return to the original workbook.
Once I have copied all the sheets into a new workbook (so there code
names are identical) I try to used the following code which does not
work:
Windows(NewWindowName).Activate
Summary.Select
Call myMethod
Note: NewWindowName is the filename of the new workbook; and Summary
is the codename for one of the sheets in both the old and new
workbook.
I would rather use the codenames so that the method is dynamic.
Please does anybody know how to fix this??
I have tried things like Activeworkbook.Summary.Select with no
success....
Thanks in advance for your time.
A
I am using the code names method to reference sheets from a Macro,
this works great when I have only one workbook open.
But, I would like to copy all the sheets into a new workbook, do some
stuff with the data in the new workbook (my problem is here!), save
the new workbook and then return to the original workbook.
Once I have copied all the sheets into a new workbook (so there code
names are identical) I try to used the following code which does not
work:
Windows(NewWindowName).Activate
Summary.Select
Call myMethod
Note: NewWindowName is the filename of the new workbook; and Summary
is the codename for one of the sheets in both the old and new
workbook.
I would rather use the codenames so that the method is dynamic.
Please does anybody know how to fix this??
I have tried things like Activeworkbook.Summary.Select with no
success....
Thanks in advance for your time.
A