Solved

Dont update Links

Posted on 2011-02-16
8
412 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

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 …
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

733 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