Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default break excel links


Hello,

IV been trying to break links in excel workbooks by VBA
But I wanted to know how to break all the links in the workbooks, no
just one single link

ActiveWorkbook.BreakLink Name:= _
"\\excel\Portfolios\sample.xls" _
, Type:=xlExcelLinks

This code breaks single link, but is there a code to break them all.

Thanks in advanc

--
striker72
-----------------------------------------------------------------------
striker72s's Profile: http://www.excelforum.com/member.php...fo&userid=2486
View this thread: http://www.excelforum.com/showthread.php?threadid=38406

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default break excel links

Hi striker72s

You can run this macro also to make text of all hyperlinks
in your worksheet

Sub test()
ActiveSheet.Hyperlinks.Delete
End Sub

Alt-F11
InsertModule from the menubar
paste the sub in there
Alt-Q to go back to Excel

If you do Alt-F8 you get a list of your macro's
Select "test" and press Run


--
Regards Ron de Bruin
http://www.rondebruin.nl


"striker72s" wrote in message
...

Hello,

IV been trying to break links in excel workbooks by VBA
But I wanted to know how to break all the links in the workbooks, not
just one single link

ActiveWorkbook.BreakLink Name:= _
"\\excel\Portfolios\sample.xls" _
, Type:=xlExcelLinks

This code breaks single link, but is there a code to break them all.

Thanks in advance


--
striker72s
------------------------------------------------------------------------
striker72s's Profile: http://www.excelforum.com/member.php...o&userid=24862
View this thread: http://www.excelforum.com/showthread...hreadid=384061



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default break excel links


iv tryed it , the datalinks didnt break ??

ActiveSheet.Hyperlinks.Delete


--
striker72s
------------------------------------------------------------------------
striker72s's Profile: http://www.excelforum.com/member.php...o&userid=24862
View this thread: http://www.excelforum.com/showthread...hreadid=384061

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default break excel links

I stole the code from VBA's help and modified it to go through all the links:

Option Explicit
Sub UseBreakLink2()

Dim astrLinks As Variant
Dim iCtr As Long

astrLinks = ActiveWorkbook.LinkSources(Type:=xlLinkTypeExcelLi nks)

If IsArray(astrLinks) Then
For iCtr = LBound(astrLinks) To UBound(astrLinks)
ActiveWorkbook.BreakLink Name:=astrLinks(iCtr), _
Type:=xlLinkTypeExcelLinks
Next iCtr
End If

End Sub



striker72s wrote:

Hello,

IV been trying to break links in excel workbooks by VBA
But I wanted to know how to break all the links in the workbooks, not
just one single link

ActiveWorkbook.BreakLink Name:= _
"\\excel\Portfolios\sample.xls" _
, Type:=xlExcelLinks

This code breaks single link, but is there a code to break them all.

Thanks in advance

--
striker72s
------------------------------------------------------------------------
striker72s's Profile: http://www.excelforum.com/member.php...o&userid=24862
View this thread: http://www.excelforum.com/showthread...hreadid=384061


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default break excel links

Ron guessed that you were writing about hyperlinks--not links to other
workbooks.


striker72s wrote:

iv tryed it , the datalinks didnt break ??

ActiveSheet.Hyperlinks.Delete

--
striker72s
------------------------------------------------------------------------
striker72s's Profile: http://www.excelforum.com/member.php...o&userid=24862
View this thread: http://www.excelforum.com/showthread...hreadid=384061


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default break excel links

ps. If you want to see the stuff with the links and decide later to break them
(or not)...

Use Bill Manville's FindLink program:
http://www.oaltd.co.uk/MVP/Default.htm

striker72s wrote:

Hello,

IV been trying to break links in excel workbooks by VBA
But I wanted to know how to break all the links in the workbooks, not
just one single link

ActiveWorkbook.BreakLink Name:= _
"\\excel\Portfolios\sample.xls" _
, Type:=xlExcelLinks

This code breaks single link, but is there a code to break them all.

Thanks in advance

--
striker72s
------------------------------------------------------------------------
striker72s's Profile: http://www.excelforum.com/member.php...o&userid=24862
View this thread: http://www.excelforum.com/showthread...hreadid=384061


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default break excel links

Thanks Dave

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Dave Peterson" wrote in message ...
Ron guessed that you were writing about hyperlinks--not links to other
workbooks.


striker72s wrote:

iv tryed it , the datalinks didnt break ??

ActiveSheet.Hyperlinks.Delete

--
striker72s
------------------------------------------------------------------------
striker72s's Profile: http://www.excelforum.com/member.php...o&userid=24862
View this thread: http://www.excelforum.com/showthread...hreadid=384061


--

Dave Peterson



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default break excel links


Dave, iv tried the code and it worked,
Thanks a lot guys for the help. Now, ill try to transform it to C# ;)


--
striker72s
------------------------------------------------------------------------
striker72s's Profile: http://www.excelforum.com/member.php...o&userid=24862
View this thread: http://www.excelforum.com/showthread...hreadid=384061

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
Excel 2003 Break Links Mr. Clean Excel Discussion (Misc queries) 0 March 2nd 09 06:50 PM
Break Links in Excel 97 CraigH Links and Linking in Excel 1 February 9th 07 05:31 PM
Excel links break on network Salman Setting up and Configuration of Excel 0 September 19th 06 10:30 AM
How to break links Excel 97 jwiley Excel Discussion (Misc queries) 2 December 20th 04 02:49 PM
break links in excel using Office 97 ? piney1643 Excel Worksheet Functions 1 November 12th 04 11:01 PM


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