CustomX
CustomX

Reputation: 10113

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

enter image description here

All help is appreciated!

Upvotes: 5

Views: 7496

Answers (1)

brettdj
brettdj

Reputation: 55702

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

Upvotes: 3

Related Questions