LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Copying Worksheets

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.Wor ksheets.Item(TargetWorkbook.Worksheets.Count))

Regards
Tim


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying worksheets? KellyLC Excel Worksheet Functions 2 October 5th 09 10:36 PM
Copying Worksheets Rich Excel Worksheet Functions 0 January 18th 07 05:00 PM
copying to worksheets Rich Excel Discussion (Misc queries) 2 December 12th 05 08:37 AM
Copying Worksheets TamW Excel Discussion (Misc queries) 1 October 4th 05 04:12 PM
Copying worksheets gingerly88 Excel Worksheet Functions 2 August 1st 05 06:58 PM


All times are GMT +1. The time now is 07:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"