Wrox Programmer Forums
BOOK: Excel 2007 VBA Programmer's Reference ISBN: 978-0-470-04643-2
This is the forum to discuss the Wrox book Excel 2007 VBA Programmer's Reference by John Green, Stephen Bullen, Rob Bovey, Michael Alexander; ISBN: 9780470046432
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Excel 2007 VBA Programmer's Reference ISBN: 978-0-470-04643-2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 20th, 2012, 08:42 PM
Registered User
Join Date: Sep 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 2010 excel VBA changing links to external excel files

I very new to VBA and trying to work a way in VBA (2010 excel) to perform the equivalent of "edit links". In my macro I search the formulas for the telltale start [ and end ] of an external link and trying to do a bulk replacement to a new external link using:

Cells.Formula.Replace What:=oldlink_filename, Replacement:=newlink_filename, LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False

Excel errors saying "run-time error 7 -- Not enough memory". The file I'm working on is ~5000 rows and has variable number of columns (~2-10) with the external link references in them. I wouldn't have thought this would be a memory issue (and the manual edit links does it no problems) so I'm assuming I using an inefficient or incorrect method to try and do the formula replacement. Any ideas how to do it?

ALSO I set Applciation.DisplayAlerts to false and when the macro opens the file with external links it displays a dialog box telling me there are links and do I want to update them or not. How can I turn off this request (and tell it I don't want the data updated)?

Any help greatly appreciated. Assume I know very little VBA in your answers!!

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pop-ups and arguments descriptions in VBA Function (Excel 2010) sektor Excel VBA 2 May 28th, 2010 04:52 AM
MS Excel - File Links - VBA a_barnsley Excel VBA 1 July 23rd, 2007 10:48 AM
Changing Cell-formating in Excel via VBA Gert VB How-To 4 May 10th, 2005 01:56 PM
External db files to Excel, via VBA automation ?? cipher_nb Excel VBA 1 December 13th, 2004 04:56 AM
Removing external links in Excel tcarnahan Excel VBA 9 February 22nd, 2004 07:21 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.