+ Reply to Thread
Results 1 to 8 of 8

Close window

  1. #1
    Registered User
    Join Date
    11-09-2006
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    200

    Close window

    Hello,
    I open a file which has links and the following window shows:

    \1

    I wonder if there is away to automatically clsoe this window from vba script?

    I tried this method and it did not work:

    Please Login or Register  to view this content.
    Thank you

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Close window

    .
    Your image link goes to an advertisement. Are you advertising for that company ?

  3. #3
    Registered User
    Join Date
    11-09-2006
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    200

    Re: Close window

    nope - could nto embed it here as usual...dialog says there are links which need to be updated...can it be clsoed from a macro?

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Close window

    .
    See if this helps :

    http://https://www.extendoffice.com/...ks-prompt.html


    The following information can be found at : https://code.i-harness.com/en/q/e37bd4

    Answers

    Open the VBA Editor of Excel and type this in the Immediate Window (See Screenshot)

    Application.AskToUpdateLinks = False
    Close Excel and then open your File. It will not prompt you again. Remember to reset it when you close the workbook else it will not work for other workbooks as well.

    ScreenShot:

    EDIT

    So applying it to your code, your code will look like this

    Function getWorkbook(bkPath As String) As Workbook
    Application.AskToUpdateLinks = False
    Set getWorkbook = Workbooks.Open(bkPath, False)
    Application.AskToUpdateLinks = True
    End Function
    FOLLOWUP

    Sigil, The code below works on files with broken links as well. Here is my test code.

    Test Conditions

    Create 2 new files. Name them Sample1.xlsx and Sample2.xlsx and save them on C:\
    In cell A1 of Sample1.xlsx, type this formula ='C:\[Sample2.xlsx]Sheet1'!$A$1
    Save and close both the files
    Delete Sample2.xlsx!!!
    Open a New workbook and it's module paste this code and run Sample. You will notice that you will not get a prompt.
    Code

    Option Explicit

    Sub Sample()
    getWorkbook "c:\Sample1.xlsx"
    End Sub

    Function getWorkbook(bkPath As String) As Workbook
    Application.AskToUpdateLinks = False
    Set getWorkbook = Workbooks.Open(bkPath, False)
    Application.AskToUpdateLinks = True
    End Function

  5. #5
    Registered User
    Join Date
    11-09-2006
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    200

    Re: Close window

    hank you for your kidn reply.....I inserted this code at the start of my macro and it did nto help((

    Please Login or Register  to view this content.

    I also used all the instrucitons here:

    https://www.extendoffice.com/documen...ks-prompt.html


    not sure why excel continues to show this promt......I also restarted excel - what do you think is the problem?

  6. #6
    Registered User
    Join Date
    11-09-2006
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    200

    Re: Close window

    I also created a separate macro run it once and restarted excel -


    Please Login or Register  to view this content.

    excel simply ignores this(((

  7. #7
    Registered User
    Join Date
    11-09-2006
    MS-Off Ver
    Excel 2010 64 bit
    Posts
    200

    Re: Close window

    It appears that this message is coming up for workbooks that have not been recalculated; . Is it possible to suppress the warning when the link is to workbooks that have not been recalculated?

    Also, I'm using Excel 2010.

  8. #8
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Close window

    .
    It is difficult for me to provide specific information as I am not experiencing the same issue here. Nor have I
    in the past.

    Hopefully someone else will provide assistance to rectify the issue.

    Please accept my apologies.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] close extra window
    By k1dr0ck in forum Excel General
    Replies: 3
    Last Post: 07-07-2017, 01:33 AM
  2. Macro does not close window ... all the way?
    By namy77 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-20-2016, 11:17 AM
  3. Close Folder Window
    By Rerock in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-12-2014, 09:56 AM
  4. [SOLVED] Close ms vba window - code
    By bulina2k in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-12-2014, 02:16 PM
  5. [SOLVED] Close excel window
    By cober123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2013, 03:10 PM
  6. Close New Window
    By Yvettemv in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-04-2012, 10:36 AM
  7. Close Excel mac help window
    By BillyC in Ross in forum Excel General
    Replies: 0
    Last Post: 08-05-2006, 02:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1