ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   forcing complete calculation (https://www.excelbanter.com/excel-programming/280171-forcing-complete-calculation.html)

Claude

forcing complete calculation
 
Hi all

Excel often doesn't calculate properly when hitting F9. I
was shown the trick that by hitting Ctrl-Alt-F9, one could
force a complete recalculation of all cells in all open
files.

Is there an equivalent to this in VBA?

Klaus[_2_]

forcing complete calculation
 
Su

Application.CalculateFull


For future occations, try recording a macro in Excel and then view in VBA
what it did. Sometimes a really helpful thing.

Klaus



No Name

forcing complete calculation
 
Thanks Klaus. In Excel97, recording the macro only gives:

Calculate


-----Original Message-----
Su

Application.CalculateFull


For future occations, try recording a macro in Excel and

then view in VBA
what it did. Sometimes a really helpful thing.

Klaus


.


Tom Ogilvy

forcing complete calculation
 
CalculateFull is available in Excel 2000 and later. In Excel 97, you need
to use sendkeys to sent Ctrl+Alt+F9

Regards,
Tom Ogilvy

"Klaus" wrote in message
...
Su

Application.CalculateFull


For future occations, try recording a macro in Excel and then view in VBA
what it did. Sometimes a really helpful thing.

Klaus





Claude

forcing complete calculation
 
This doesn't seem to work in Excel97...

-----Original Message-----
Su

Application.CalculateFull


For future occations, try recording a macro in Excel and

then view in VBA
what it did. Sometimes a really helpful thing.

Klaus


.


Tom Ogilvy

forcing complete calculation
 
CalculateFull is not available in Excel 97. You have to use sendkeys to do
Ctrl+Alt+F9

Previously posted by Charles Williams:

if val(application.version)<9 then

Application.SendKeys "%^{F9}"
DoEvents

else
application.calculatefull
endif

--
Regards,
Tom Ogilvy


wrote in message
...
Thanks Klaus. In Excel97, recording the macro only gives:

Calculate


-----Original Message-----
Su

Application.CalculateFull


For future occations, try recording a macro in Excel and

then view in VBA
what it did. Sometimes a really helpful thing.

Klaus


.




Tom Ogilvy

forcing complete calculation
 
That is correct. See my response.

--
Regards,
Tom Ogilvy

"Claude" wrote in message
...
This doesn't seem to work in Excel97...

-----Original Message-----
Su

Application.CalculateFull


For future occations, try recording a macro in Excel and

then view in VBA
what it did. Sometimes a really helpful thing.

Klaus


.





All times are GMT +1. The time now is 06:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com