ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Break Links Macro help... (https://www.excelbanter.com/excel-programming/388027-break-links-macro-help.html)

mydogpeanut

Break Links Macro help...
 
Hello,

I need to write a Macro that will open up several workbooks (not all at
once), break all links and then save the workbook and then close it back
down.

Can anyone help me?

Thanks so much!!

Ron de Bruin

Break Links Macro help...
 
Hi mydogpeanut

In this macro you can see how to open the workbooks
http://www.rondebruin.nl/copy4.htm

Then instead of the copy code you can use code from this page to break the links
http://www.rondebruin.nl/values.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mydogpeanut" wrote in message ...
Hello,

I need to write a Macro that will open up several workbooks (not all at
once), break all links and then save the workbook and then close it back
down.

Can anyone help me?

Thanks so much!!


mydogpeanut

Break Links Macro help...
 
Thanks so much. Works great!!! I appreciate it :)

"Ron de Bruin" wrote:

Hi mydogpeanut

In this macro you can see how to open the workbooks
http://www.rondebruin.nl/copy4.htm

Then instead of the copy code you can use code from this page to break the links
http://www.rondebruin.nl/values.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mydogpeanut" wrote in message ...
Hello,

I need to write a Macro that will open up several workbooks (not all at
once), break all links and then save the workbook and then close it back
down.

Can anyone help me?

Thanks so much!!



Ron de Bruin

Break Links Macro help...
 
You are welcome

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mydogpeanut" wrote in message ...
Thanks so much. Works great!!! I appreciate it :)

"Ron de Bruin" wrote:

Hi mydogpeanut

In this macro you can see how to open the workbooks
http://www.rondebruin.nl/copy4.htm

Then instead of the copy code you can use code from this page to break the links
http://www.rondebruin.nl/values.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"mydogpeanut" wrote in message ...
Hello,

I need to write a Macro that will open up several workbooks (not all at
once), break all links and then save the workbook and then close it back
down.

Can anyone help me?

Thanks so much!!




matt

Break Links Macro help...
 
On Apr 24, 5:50 am, mydogpeanut
wrote:
Hello,

I need to write a Macro that will open up several workbooks (not all at
once), break all links and then save the workbook and then close it back
down.

Can anyone help me?

Thanks so much!!


I haven't ever had to do something like this before, but you can
create the directory path, loop through the Excel files within the
directory, open the workbook, break the link, and close and save
changes.

Open the Visual Basic Editor and search "BreakLink Method" (or use the
macro recorder to see how to write the syntax for breaking links), and
search for "Close Method" as well. Both of these should give you what
you are looking for.

ActiveWorkbook.BreakLink Name:=... Type:=...

Workbooks(...).Close SaveChanges:=True

Matt



All times are GMT +1. The time now is 09:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com