Saving time when updating

singlgl1

Board Regular
Joined
Jan 13, 2007
Messages
127
I have a file that links to 31 different files to grab one value from each.
The filepath for each is shown below, only the date changes for each.
When my file updates all links it is rather slow and the user will frequently elect not to update at all.
I'd like to have a code in place that would only update the file that corresponds to the date that the file is opened,for example today(7-10-11) when I open it I'd like to automatically update only the link below and so on.
'H:\Morning Reports 2011\Jul\[7-10-11.xls]Production'!$AA$30)

Hope this makes sense, if not I can clarify further.
Any help will be appreciated as this will speed up the process and still get the info I need.
Thanks in advance.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
To examine links in a sheet and test which one to update, I'd think something like this would work:
Code:
mylinkarray = ActiveWorkbook.LinkSources
strtest = Format(Date, "yyyy\\mmm") & "\" & Format(Date, "m-d-yy")
For Each lnk In mylinkarray
    If InStr(1, lnk, strtest) > 0 Then
        ActiveWorkbook.UpdateLink (lnk)
    End If
Next
Is that the kind of thing you were after? You'd run a macro like this instead of updating links, after opening a workbook.
 
Upvote 0

Forum statistics

Threads
1,224,516
Messages
6,179,231
Members
452,898
Latest member
Capolavoro009

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top