T
Tim Marsden
Hi,
I wish to copy several worksheets from one workbook to another using VB.NET
interop code.
I have recorded the actions in a Excel macro to view the code and it seems
straight forward.
However, if I repeat the code in VB.NET, after the worksheets have been
copied any references to named ranges are corrupt, they don't even reference
the original workbook.
Is there any way within Excel or in code to reset the named ranges to
reference the workbook the worksheets where copied to.
Sample Copde:
SourceWorkbook.Worksheets.Copy(,TargetWorkbook.Worksheets.Item(TargetWorkbook.Worksheets.Count))
Regards
Tim
I wish to copy several worksheets from one workbook to another using VB.NET
interop code.
I have recorded the actions in a Excel macro to view the code and it seems
straight forward.
However, if I repeat the code in VB.NET, after the worksheets have been
copied any references to named ranges are corrupt, they don't even reference
the original workbook.
Is there any way within Excel or in code to reset the named ranges to
reference the workbook the worksheets where copied to.
Sample Copde:
SourceWorkbook.Worksheets.Copy(,TargetWorkbook.Worksheets.Item(TargetWorkbook.Worksheets.Count))
Regards
Tim