I have a number of spreadsheets written with VBA code in the background that that rely on iterative calculations until a solution is found. These worked fine up until around the 11th of February 2025. Since then the Worksheets("Sheet1").UsedRange.Calculate
has not been working. I have to set the workbook up to Application.Calculation = xlManual
, otherwise some of my calculations can become unstable. I have then been cascading the calculations across the sheets in a specific order to allow the data to flow through.
In simple terms my problem is that if I open a new workbook and for example set cell A1
to =B1
and cell B1
to =A1+1
. This should increment the values every time I recalculate the sheet. Indeed if I F9
it does. However, when the workbook is set to: Application.Calculation = xlManual
, though F9
still works Worksheets("Sheet1").UsedRange.Calculate
does not. Please see my test code below including comments.
Sub TestCalculate()
Worksheets("Sheet1").UsedRange.Calculate 'Now only works when Automatic Calculations are enabled.`
'Application.Calculate 'Works fine with or without Automatic Calculation enabled but calculates the whole workbook which is not what I need.`
End Sub
I feel like this maybe linked to an Office 365 update as I cannot understand why else it would stop working but am reluctant to roll back the version and have this problem reappear later. Any help would be greatly appreciated. Many Thanks
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744786511a4593660.html
评论列表(0条)