Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Disable Update Links Popup for Excel



  • Please log in to reply
2 replies to this topic
gxr061
  • Members
  • 10 posts
  • Last active: Jun 14 2015 03:03 AM
  • Joined: 24 Jan 2014

Whenever I open an Excel Workbook, a popup shows up asking me if I want to update links. I usually don't, but its a hassle clicking Don't Update each time. I wanted to create a code for whenever Excel starts up, Tab and then Enter would be entered so I could avoid the pop-up, but I need help with fixing the code. Here's what I got so far but its not working right now:

IfWinActive, Excel
{
SendInput {Tab}
sleep 100
Sendinput {Enter}
sleep 200
}
Return

I tried running the window spy and got the below text, but I don't know what to make of it. I'm not sure if that can help with my code, but I thought I could provide it in case its needed.

 

>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<

Microsoft Excel

ahk_class #32770

 

>>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<<

On Screen:          1120, 423  (less often used)

In Active Window:            637, -35

 

>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<

 

Color:    0xF0F0F0  (Blue=F0 Green=F0 Red=F0)

 

>>>>>>>>>>( Active Window Position )<<<<<<<<<<

left: 483     top: 458     width: 750     height: 154

 

>>>>>>>>>>>( Status Bar Text )<<<<<<<<<<

 

>>>>>>>>>>>( Visible Window Text )<<<<<<<<<<<

&Update

Do&n't Update

&Help

This workbook contains links to one or more external sources that could be unsafe.

 

If you trust the links, update them to get the latest data. Otherwise, you can keep working with the data you have.

 

>>>>>>>>>>>( Hidden Window Text )<<<<<<<<<<<

100198

 

>>>>( TitleMatchMode=slow Visible Text )<<<<

 

>>>>( TitleMatchMode=slow Hidden Text )<<<<

 

 

shortcut+excel+tip+of+the+day+exceltip2d



flyingDman
  • Spam Officer
  • 2186 posts
  • Last active: Nov 07 2015 08:15 AM
  • Joined: 27 Feb 2009

If you are opening the same files multiple times, you could save these files such that the message is not shown. (data/edit links/Startup Prompt/2nd or 3rd radio button in Excel 2013). Then the next time you open the file, the message is not shown.

You can also open the files programmatically:

Xl := ComObjCreate("Excel.Application")             ;create a handle to a new excel application
Xl.Workbooks.Open(file2open,0,0)                   	;opens file and does not update
;Xl.Workbooks.Open(file2open,3,0)                   	;opens file and updates all links w/o asking
Xl.Visible := True

If you compile the following:

file2open = %1%
Xl := ComObjCreate("Excel.Application")             ;create a handle to a new excel application
Xl.Workbooks.Open(file2open,0,0)                   	;open file do not update
Xl.Visible := True

and associate the .xlsx files to the .exe, double clicking on on xlsx file will open the excel file without prompting you to update the links.


Marine Corps Gen. Joseph Dunford told senators at his Joint Chiefs of Staff confirmation hearing : “If you want to talk about a nation that could pose an existential threat to the United States, I'd have to point to Russia. And if you look at their behavior, it's nothing short of alarming.”


gxr061
  • Members
  • 10 posts
  • Last active: Jun 14 2015 03:03 AM
  • Joined: 24 Jan 2014
✓  Best Answer

Answered my own question with this code:

 

Loop
{
WinWait, ,This workbook contains links to one or more external sources that could be unsafe ,0
WinClose
}