Run-time error '1004':
Calculate method of Range class failed
Calculate method of Range class failed
Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.
View products that this article applies to.
Sub CalcTheRange()
'Replace Cell with the actual cell range in your workbook
'For example, ("A2:F4")
SafeCalcRange ThisWorkbook.Sheets("SheetName").Range("Cell:Cell")
End Sub
Sub SafeCalcRange(rng As Range)
For Each cl In rng.Cells
If cl.HasArray Then Set rng = Union(rng, cl.CurrentArray)
Next cl
rng.Calculate
End Sub
Keywords: KB825011, kbprb, kberrmsg, kbnofix