+ Reply to Thread
Results 1 to 8 of 8

updating links through VBA causing sheet recalculation

  1. #1
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    updating links through VBA causing sheet recalculation

    I have an addin with UDFs that my department uses, when opening a file with these functions in we have to relink it to our own copy of the addin. As this only takes a second I decided to write it into the addin however when the VBA relinks formulas to the addin it performs a full sheet recalculation which on sheets this size can take up to 10mins.

    manualy fixing the links doesn't cause a full sheet recalc, why is the VBA version doing this and how do I stop it?

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: updating links through VBA causing sheet recalculation

    Don't you have a central location that you can store the add-in? It will resolve this problem and make it much more simple to maintain.

  3. #3
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: updating links through VBA causing sheet recalculation

    There is a central location however the drive is mapped inder a different name depending on what access each user has (I found this out when trying to set the addin to check a certain location for updates)

    also each users addin contains a modifiable table that they fill in with things that need to be added to worksheets in the addin which would not work with a network copy which would have to be read only.

    edit: also the addin location would still be lost when files are drag and droped between drives
    Last edited by Leon V (AW); 10-17-2013 at 04:50 AM.

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: updating links through VBA causing sheet recalculation

    Quote Originally Posted by Leon V (AW) View Post
    also each users addin contains a modifiable table that they fill in with things that need to be added to worksheets in the addin which would not work with a network copy which would have to be read only.
    Add-ins should ideally be read only. If you require user data to be stored it should be stored in a separate file from the code.

    What is your code for changing the links?

  5. #5
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: updating links through VBA causing sheet recalculation

    Please Login or Register  to view this content.
    censored name just in case (MoD stuff).

    the origonal code from Jan (see here) had a class macro that was set to check every workbook automatically but it wouldn't work for me (I think it was writen for Xl 2003)

    the line "ActiveWorkbook.ChangeLink vLink, ThisWorkbook.Name, xlExcelLinks" is where it starts doing a full recalc

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: updating links through VBA causing sheet recalculation

    If you run that code manually, not from a Ribbon control, does it behave the same way?

  7. #7
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    328

    Re: updating links through VBA causing sheet recalculation

    Yes. and it also still does it if I take it out of the addin and put it in the workbook

  8. #8
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: updating links through VBA causing sheet recalculation

    I think you have no option then - probably because you are running VBA the other VBA updates (this is common occurrence with UDFs).

+ 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. Excel Links Not Updating, But All Links status are ok
    By DJPROLE in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-04-2011, 10:44 AM
  2. External Links Causing Issues
    By kushalb in forum Excel General
    Replies: 4
    Last Post: 05-23-2011, 06:27 AM
  3. Replies: 0
    Last Post: 09-29-2010, 04:50 PM
  4. updating links only for the active sheet
    By alpertheidiot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-15-2009, 07:24 AM
  5. Replies: 0
    Last Post: 04-01-2009, 01:10 PM

Tags for this Thread

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