How to suppress Update Links warning?

前端 未结 7 1747
有刺的猬
有刺的猬 2020-11-29 16:51

I\'m trying to write a script that opens many Excel files. I keep getting the prompt:

This workbook contains links to other data sources.

7条回答
  •  星月不相逢
    2020-11-29 17:11

    I've found a temporary solution that will at least let me process this job. I wrote a short AutoIt script that waits for the "Update Links" window to appear, then clicks the "Don't Update" button. Code is as follows:

    while 1
    if winexists("Microsoft Excel","This workbook contains links to other data sources.") Then
       controlclick("Microsoft Excel","This workbook contains links to other data sources.",2)
    EndIf
    WEnd
    

    So far this seems to be working. I'd really like to find a solution that's entirely VBA, however, so that I can make this a standalone application.

提交回复
热议问题