LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Removing Links

The best would be to avoid the problem.

Without knowing how you induced the links, it is hard to say how to avoid
it, but one way would be to make a copy of the complete file, then remove
what you don't want in the new file.

ActiveWorkbook.SaveCopyAs "newname.xls"
workbooks.Open NewName.xls
Application.DisplayAlerts = False
activeworkbook.Worksheets(3).Delete
Application.DisplayAlerts = True


Or copy all the sheets you want to copy at one time

Worksheets(Array("Sheet1","Sheet3","sheet5")).Copy

as long as they don't refer to any sheets that were not copies, then the
links would not be created.

Otherwise, turn on the macro recorder while you change the source of the
links and use that code as your start.

--
Regards,
Tom Ogilvy




"rothco" wrote in
message ...

Thanks for that

But how do I do it in VBA so the user does not have to manually update
the links?

Roy


--
rothco
------------------------------------------------------------------------
rothco's Profile:

http://www.excelforum.com/member.php...o&userid=31492
View this thread: http://www.excelforum.com/showthread...hreadid=511707



 
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
Removing Links Curtis Excel Worksheet Functions 3 November 4th 09 11:12 PM
Removing Intermediary Links FARAZ QURESHI Excel Discussion (Misc queries) 0 January 3rd 09 07:01 AM
Removing links Dino Excel Worksheet Functions 2 October 5th 05 05:11 PM
removing values not links Jase Excel Programming 1 January 17th 05 05:41 AM
Removing links Jon Excel Programming 1 January 22nd 04 11:21 PM


All times are GMT +1. The time now is 07:05 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"