简体   繁体   中英

Excel VBA - Runtime error 1004 (RefreshAll fails)

I have created a macro to refresh my workbook (recalc values, refresh links, etc).

The code to refresh links works fine but when it hits the RefreshAll I get the following error.

ActiveWorkbook.UpdateLink Name:="F:\klanten.xlsm", Type:=xlExcelLinks
ActiveWorkbook.RefreshAll

在此输入图像描述

All help is appreciated!

Rather than a RefreshAll option you are looking for a Calculate option

I suggest you use Application.CalculateFull to calculate all formulae

This link from Charles Williams on Excel Calculation Methods may prove useful

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM