[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Excel VBA - Don't show "Enable Links" dialog

Posted on 2011-10-31
8
Medium Priority
?
340 Views
Last Modified: 2012-05-12
Is there a way to stop the dialog that asks a user whether or not to enable links?

Thanks, --Andres
0
Comment
Question by:AndresHernando
8 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37056275
Go to "Edit links" and from there select "Startup prompt" and then select the preferred option
0
 
LVL 35

Expert Comment

by:Robert Schutt
ID: 37057247
Or, if you're already using VBA to open a workbook and want to avoid the dialog in that situation, look at the arguments of Workbooks.Open: you can decide to update links or not.

 options for UpdateLinks argument
0
 
LVL 6

Expert Comment

by:royhsiao
ID: 37057310
Edit links should be in the data tab.

Here we will provide two methods to find out the Edit links command in Microsoft Excel 2010 and Excel 2007.
http://www.addintools.com/documents/excel/where-is-edit-links/where-is-edit-break-links.html
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:AndresHernando
ID: 37060879
I should have been more explicit in my question (sorry).
I want to email a file (filename.xlsm) that will NOT ask to enable links.  The file will keep links disabled.

Is there a way to include code in the file that will do this?
0
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 2000 total points
ID: 37061399
Maybe you want to break the links and only leave the values?

This can be done manually (in my version of excel via the ribbon menu: Data - Edit links - Break link) or with VBA:

Private Sub unlinkall()
    Dim ls
    If Not IsEmpty(ActiveWorkbook.LinkSources) Then
        For Each ls In ActiveWorkbook.LinkSources(xlExcelLinks)
            ActiveWorkbook.BreakLink ls, xlLinkTypeExcelLinks
        Next
    End If
End Sub

Open in new window


Then save as a copy and email that version.
0
 

Author Comment

by:AndresHernando
ID: 37061611
I just want to avoid the dialog from opening at all.  I want to simplify to avoid the recipient of the file having to figure out what to do (which is to NOT enable links).
0
 
LVL 35

Expert Comment

by:Robert Schutt
ID: 37061695
exactly, so if he's never going to be able to update the links you could break the link before mailing the file. I'm not sure if it's possible to prevent the message otherwise.
0
 

Author Comment

by:AndresHernando
ID: 37070548
Robert, Ah, of course!...  that's exactly what I needed.   Thanks!  
ssaqibh and roy, thanks for your input.  --Andres
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

864 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