?
Solved

Dont update Links

Posted on 2011-02-16
8
Medium Priority
?
419 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 4

Assisted Solution

by:loki_loki
loki_loki earned 460 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 460 total points
ID: 34905099
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 33

Assisted Solution

by:jppinto
jppinto earned 460 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
 
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 620 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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