#1   Report Post  
Ian Elliott
 
Posts: n/a
Default how speed up links?

Thanks for any help.
I have an Excel worksheet that has 13 links to one other file. The links are
in form of file name, worksheet name, & cell address in the cells of this
file. Like:
=('M:\PRODUCTION\LCA-ACTL\LIBRARY\ECF Reports\2005-08\[ECF -
08-19pm.xls]Main Portfolio'!G22)/1000
I also have a macro that changes the file in the link, using search and
replace:
Cells.Replace What:=c, Replacement:=H, LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False,
ReplaceFormat:=False
For example, c='[ECF - 08-19pm.xls]' and H='[ECF - 08-20pm.xls]'.
My problem is it takes about 30-45 seconds for the macro to replace the
whole 13 links. I can see each cell blank out one by one slowly, then after
they have all blanked out, they are updated with the info in the other file.
I figure I must be doing something inefficiently, is there a way I can speed
this up? Any help appreciated.
  #2   Report Post  
 
Posts: n/a
Default

You could add Application.ScreenUpdating = False to the begining of
your code and then Application.ScreenUpdating = True at the end. This
might save a little time.

  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default

Have your workbook open that other file, do the edit|Replace (in code), then
close the other workbook.

Ian Elliott wrote:

Thanks for any help.
I have an Excel worksheet that has 13 links to one other file. The links are
in form of file name, worksheet name, & cell address in the cells of this
file. Like:
=('M:\PRODUCTION\LCA-ACTL\LIBRARY\ECF Reports\2005-08\[ECF -
08-19pm.xls]Main Portfolio'!G22)/1000
I also have a macro that changes the file in the link, using search and
replace:
Cells.Replace What:=c, Replacement:=H, LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False,
ReplaceFormat:=False
For example, c='[ECF - 08-19pm.xls]' and H='[ECF - 08-20pm.xls]'.
My problem is it takes about 30-45 seconds for the macro to replace the
whole 13 links. I can see each cell blank out one by one slowly, then after
they have all blanked out, they are updated with the info in the other file.
I figure I must be doing something inefficiently, is there a way I can speed
this up? Any help appreciated.


--

Dave Peterson
Reply
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
How to Reduce Spreadsheet Size and Speed ExcelMonkey Excel Worksheet Functions 4 August 9th 05 06:38 PM
Cut links between worksheets in same workbook Houndstooth Excel Worksheet Functions 1 June 7th 05 11:36 AM
Reoccurring Edit Links Error Spyder Excel Discussion (Misc queries) 6 April 12th 05 02:30 PM
can't update links...can't find links GJR3599 Excel Discussion (Misc queries) 1 April 4th 05 04:56 PM
Links in formulas change when another user runs a workbook L Mehl Excel Discussion (Misc queries) 2 November 27th 04 09:27 PM


All times are GMT +1. The time now is 04:29 AM.

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

About Us

"It's about Microsoft Excel"