Solved

Dont update Links

Posted on 2011-02-16
8
405 Views
Last Modified: 2012-06-27
Hi,

I need a bit of code for Workbook Open that instructs the spreadsheet not to update its links

I dont want never as i have a button to update them later in the report

So on Workbook Open:Dont update links

Thanks
Seamus
0
Comment
Question by:Seamus2626
8 Comments
 
LVL 4

Assisted Solution

by:loki_loki
loki_loki earned 115 total points
ID: 34905080
Like this?

Sub OpenDontUpdate()

    Workbooks.Open FileName:= _

        "C:\My Documents\LinkedBook.xls", UpdateLinks:=xlUpdateLinksNever

End Sub


http://www.ozgrid.com/VBA/update-links.htm
0
 

Author Comment

by:Seamus2626
ID: 34905089
Thanks loki_loki, but will i be able to update the links afterwards or will xlUpdateLinksNever mean i cant?

Thanks
Seamus
0
 
LVL 11

Assisted Solution

by:Runrigger
Runrigger earned 115 total points
ID: 34905099
0
 
LVL 33

Assisted Solution

by:jppinto
jppinto earned 115 total points
ID: 34905103
Private Sub Workbook_Open()
   With Application        
      .DisplayAlerts = False        
   End With
      ActiveWorkbook.UpdateLinks = xlUpdateLinksNever
   With Application        
      .DisplayAlerts = True
   End With
End Sub
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 50

Expert Comment

by:Dave Brett
ID: 34905116
You can control this behaviour from the menu  

in xl 2007
Data ... Edit Links
startup prompt
then pick
1) alert to give choice
2) no alert no update
3) no alert update

Cheers

Dave
0
 

Author Comment

by:Seamus2626
ID: 34905122
Thanks guys, i am willing to use  xlUpdateLinksNever (im 2003) however, this is going to be on open. After 2mins if the user presses the button i have to update the links, will that be affected by the fact that "xlUpdateLinksNever" is in workbook open?

Thanks
Seamus
0
 
LVL 50

Accepted Solution

by:
Dave Brett earned 155 total points
ID: 34905151
No

It will update when you run Edit Links manually, or open the source file

xlUpdateLinksNeve ris equivalent to choice (2) in the manual list

For mine you should use the manual setting as code may be disabled

Cheers

Dave
0
 

Author Closing Comment

by:Seamus2626
ID: 34905171
Perfect, thanks Dave, thanks all

Cheers,
Seamus
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now