LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
PO PO is offline
external usenet poster
 
Posts: 66
Default Sheets.Copy breaking the links

Excel 2003, sp2

I use the following code to import a sheet from another workbook:
Workbooks("Data").Sheets("SiteData2").Copy
After:=ThisWorkbook.Sheets("SiteData1")

Both workbooks contain a sheet named "SiteInfo" and all SiteData sheets
contain linked formulas to the SiteInfo sheet. After the copy "SiteData2"
links to the workbook from which it originated. I however want the links to
point to SiteInfo in the workbook it was imported to.

So far I have solved this problem by looping through the SiteData2 sheet,
replacing the =[Data.xls] part of the link with "" in all cells. The
SiteData sheet contains however a lot of links and sometimes my macro
"imports" 10 or more sheets in a row. Thus the code has to loop through a
lot of cells in many sheets which makes the import take up to 30 secs.

Is there a better way to do this?

Regards
Pete


 
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
Sorting Worksheet w/o breaking links to other sheets Bookish Excel Discussion (Misc queries) 0 November 7th 07 04:52 PM
Breaking Links [email protected] Excel Discussion (Misc queries) 1 October 1st 06 07:41 PM
Breaking Links thelees Excel Discussion (Misc queries) 1 September 24th 05 07:11 PM
Breaking Links tojo107 Excel Discussion (Misc queries) 2 July 20th 05 05:40 AM
Breaking Links Guilherme Loretti Excel Discussion (Misc queries) 1 March 9th 05 09:56 PM


All times are GMT +1. The time now is 07:28 PM.

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"