Updating link macro

moyemrick

New Member
Joined
Dec 8, 2006
Messages
7
I'm trying to create a macro that update the links (or one specific one) on my worksheet. Does anyonre know how to do this?

thanks,

moy
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Assuming you do not mean hyperlinks....

http://www.mrexcel.com/board2/viewtopic.php?t=276872&highlight=links

Or
"Find links in a workbook" in the Excel help files. You do a find and replace operation (Ctrl + H)

Regards.

------
EDIT:
I should be more clear:
If your formulas look like -
=[BookOne.xls]Sheet1!$A$1

You can Find -
BookOne.xls

and Replace -
BookNewBook.xls

I guess I am thinking in terms of updating as changing.

------
If you mean updating links as refreshing the values:
Code:
Sub MyUpdateLinks()

ThisWorkbook.UpdateLink Name:=ThisWorkbook.LinkSources

End Sub

The above code is from the help files and is supposed to update all link sources...I haven't tested it. I changed the reference from ActiveWorkbook (in the help files) to ThisWorkbook (in my code above).

Hope I have got this right for you! I suppose alternatively you could just open the link sources.
 
Upvote 0

Forum statistics

Threads
1,215,046
Messages
6,122,854
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top