ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Updating Links in Excel (https://www.excelbanter.com/excel-programming/282953-updating-links-excel.html)

Danny[_4_]

Updating Links in Excel
 
I have a spreadsheet which retrieves data from several
other spreadsheets. When i open this spreadsheet it asks
me would i like to update the links and i click Yes and my
data is now current.

Does anyone know the code for this update. I want a button
which will run the same script as when i click Yes on
entry to the spreadsheet to update the links.

Thanks,

Danny.

J.E. McGimpsey

Updating Links in Excel
 
One way:

With ThisWorkbook
.UpdateLink Name:=.LinkSources
End With

In article ,
"Danny" wrote:

I have a spreadsheet which retrieves data from several
other spreadsheets. When i open this spreadsheet it asks
me would i like to update the links and i click Yes and my
data is now current.

Does anyone know the code for this update. I want a button
which will run the same script as when i click Yes on
entry to the spreadsheet to update the links.


Danny[_4_]

Updating Links in Excel
 
I am very new to code. Do i need to enter some variables
as the code as it is does not seem to work?

The spreadsheet with the linked data in is called book1
and the source data is from book2.

Any ideas?


-----Original Message-----
One way:

With ThisWorkbook
.UpdateLink Name:=.LinkSources
End With

In article ,
"Danny" wrote:

I have a spreadsheet which retrieves data from several
other spreadsheets. When i open this spreadsheet it

asks
me would i like to update the links and i click Yes and

my
data is now current.

Does anyone know the code for this update. I want a

button
which will run the same script as when i click Yes on
entry to the spreadsheet to update the links.

.



All times are GMT +1. The time now is 05:46 PM.

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