VBA Calculate not working! Any advice?

xdsl

New Member
Joined
Feb 17, 2009
Messages
1
Hi all,

Unsure why this problem is happening, but i am currently developing an excel model (quite large in size) [Excel 2007, but also occurs in Excel 2003].

The issue I run into is that in certain vba macros i have been writing (and i suspect it is also now occuring in other macros which were previously working), is that the "calculate" line in the coding does not re-calculate certain cells (in regards to a loop function, which keeps looping until a certain cell becomes negative in value)

If I open the vba editor and step thru the macro line-by-line, it calculates the values correctly when instructed if i pause after the "calculate" line, and keeps looping till the cell being tested becomes negative.
But if i hold down F8 (or let it run automatically via F5) it runs thru the macro quickly and updates cells which determing the scenario, but then the cell to be tested for to determine when the loop ends does not update, and hence it keeps looping and goes past the point where it should stop.

Any ideas on why this may be happening and how to solve it would be highly appreciated, especially as i suspect its worringly also happening in other macros within the model too now.

Any help appreciated.. Thanks!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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