+ Reply to Thread
Results 1 to 1 of 1

problems with links and updating a worksheet in vba

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Posts
    154

    problems with links and updating a worksheet in vba

    Basically I have a bunch of links to external workbooks that grab some data out of them, these workbooks will not always exist and will change but are always in the range ex1.xls to ex10.xls.

    My problem is that it grabs the data from a workbook, if i then remove that workbook, the values stay in my workbook even though the other workbook doesnt even exist anymore. What the hell is it doing? I've tried Worksheets("Summary").calculate but it has no effect at all. This is *AFTER* I have updated all the links in the workbook with ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources (and they do get updated because it picks up new files if i was to add an ex7 for example, ut when i remove ex7 the values stay there!!!!)

    The only way for my to get rid of the old values is click in the formula and click out again (then get a file box looking for the file and have to click cancel), it then seems to update the value to 0 as specified in my formula.

    The formula in the cells which is linking to the other workbooks is

    =IF(NOT(ISERROR(SUM('[EX2.xls]Time Card'!$M$15:$M$16))),'[EX2.xls]Time Card'!$D$19,"0")

    Basically i use a sum of M15 and M16 to check whether the file exists and if not (error generated) then it should put a 0 in the cell. If the file does exist then it should equal the cell D19 in that file. I have done an evaluate formula on it and it DOES evaluate that error='ref!' this iserror = true, not iserror = false therefore it should equal 0, yet even in the formula evaluation it comes out as the old value which is 572 !!!!!!!! ive TOLD it to be 0 and its ignoring it

    anyone know whats going on? its driving me mad. Although im not expecting any replies as I havent had any to the last 20 or so threads ive posted, im not even convinced they are getting posted anymore.

    It isnt making any sence, i add a file and it grabs the data, i remove the file and update the links again and the damn values stay there! And this is after i unticked "Save External link values" under options/calculation! which has made no difference to it.
    Last edited by neowok; 03-01-2005 at 07:28 AM.

+ 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