Solved

Dont update Links

Posted on 2011-02-16
8
416 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 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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
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
 
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
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…

724 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