+ Reply to Thread
Results 1 to 6 of 6

Closing a workbook

Hybrid View

SAsplin Closing a workbook 11-05-2009, 12:40 PM
royUK Re: Closing a workbook 11-05-2009, 01:32 PM
SAsplin Re: Closing a workbook 11-06-2009, 06:00 AM
Jack in the UK Re: Closing a workbook 11-06-2009, 07:48 AM
SAsplin Re: Closing a workbook 11-06-2009, 08:13 AM
Jack in the UK Re: Closing a workbook 11-06-2009, 08:33 AM
  1. #1
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Closing a workbook

    Hi folks -

    I have an ActiveWorkbook.Close code but as the workbook closes it comes up with a message box:

    "This workbook contains one or more links that cannot be updated"
    To change the source links, click Edit Links
    To leave the links as is, click Continue

    Continue Edit Links....

    Is there a line of code I can add to automatically select the 'Continue' option?

    Thanks

    Steve

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Closing a workbook

    Try adding this at the start of Before Close
    Application.AskToUpdateLinks = False
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Unhappy Re: Closing a workbook

    Hi Roy -

    Unfortunately that bit of code didn't work.

    Steve

  4. #4
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: Closing a workbook

    Post the code so far in ActiveWorkbook.Close

  5. #5
    Forum Contributor
    Join Date
    08-17-2009
    Location
    West Midlands
    MS-Off Ver
    Excel 2016
    Posts
    213

    Re: Closing a workbook

    Thanks folks -

    I've worked it out. As with most things it was quite simple in the end:

    Workbooks.Open Filename:="fullpath", Password:="****", UpdateLinks:=0

    Cheers

    Steve

  6. #6
    Valued Forum Contributor
    Join Date
    07-21-2008
    Location
    London, UK
    Posts
    326

    Re: Closing a workbook

    Sub myUpDate_LINKS()
    
    '// jiuk
    '// Call this in the close procedure ie
    '// Call myUpDate_LINKS
    
        Workbooks.Open Filename:="c:\Dir\youFile.xls", _
                UpdateLinks:=True
        
        Exit Sub
                            
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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