D
Doug Glancy
My 3rd try on this question, hopefully the charm...
There was discussion last week of the advantage of referring to a worksheet
by it's code name, e.g., Sheet1 rather than it's tab name, as in
WorkSheets("mysheet") or by index, as in WorkSheets(1). My question
is how to refer to a sheet in another workbook. I've tried:
Workbooks("mybook").Sheet1 and other such variations, without success.
I can access a sheet by code name in another workbook as a VBComponent e.g.,
Workbooks("Book1").VBProject.VBComponents.Item("Sheet1")
but then I can't, for example, refer to a range within the component.
Thanks in advance for any help a with this,
Doug
There was discussion last week of the advantage of referring to a worksheet
by it's code name, e.g., Sheet1 rather than it's tab name, as in
WorkSheets("mysheet") or by index, as in WorkSheets(1). My question
is how to refer to a sheet in another workbook. I've tried:
Workbooks("mybook").Sheet1 and other such variations, without success.
I can access a sheet by code name in another workbook as a VBComponent e.g.,
Workbooks("Book1").VBProject.VBComponents.Item("Sheet1")
but then I can't, for example, refer to a range within the component.
Thanks in advance for any help a with this,
Doug