ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   changing the filename in a Link (https://www.excelbanter.com/excel-discussion-misc-queries/239540-changing-filename-link.html)

Ben

changing the filename in a Link
 
Hi,

i have tryed but failed in writing a macro that would change the filename in
a link. I want my users to enter the file name in a cell on one sheet and
then press a button to change the filename in all links in the workbook.

can any one help me?

THX

Don Guillett

changing the filename in a Link
 
Sub ChangeLinks()
ActiveWorkbook.ChangeLink Name:="menu.xls", _
NewName:="wiebe.xls", Type:=xlExcelLinks
End Sub
or
NewName:=range("a1").value, Type:=xlExcelLinks

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ben" wrote in message
...
Hi,

i have tryed but failed in writing a macro that would change the filename
in
a link. I want my users to enter the file name in a cell on one sheet and
then press a button to change the filename in all links in the workbook.

can any one help me?

THX




All times are GMT +1. The time now is 12:33 PM.

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