ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Why can't a calculation and macro execute at the same time? (https://www.excelbanter.com/excel-programming/301444-why-cant-calculation-macro-execute-same-time.html)

Katy[_3_]

Why can't a calculation and macro execute at the same time?
 
Is there ant way of getting around this?

When my sheet is calculating my macro freezes up until the
calculation is completed on the worksheet, is there any
way I can set up my worksheet so that a calculation and a
macro can execute at the same time?

Frank Kabel

Why can't a calculation and macro execute at the same time?
 
Hi
AFAIK not possible. But why do you need this?

--
Regards
Frank Kabel
Frankfurt, Germany


Katy wrote:
Is there ant way of getting around this?

When my sheet is calculating my macro freezes up until the
calculation is completed on the worksheet, is there any
way I can set up my worksheet so that a calculation and a
macro can execute at the same time?


pikus

Why can't a calculation and macro execute at the same time?
 
Well, yes. I believe if you add "Application.Calculate" to th
appropriate place in your code it will take care of that for you.
Piku

--
Message posted from http://www.ExcelForum.com


pikus

Why can't a calculation and macro execute at the same time?
 
And as for why, Frank, anything in VBA and the calculation of the sheet
formulas are separate processes. If you're relying on the result of
formula for part of your code you must tell VBA to calculate it fo
you. You could just do the math within your code, but especially whe
there are multiple formulas it's easier to do it the other way. - Piku

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Why can't a calculation and macro execute at the same time?
 
This certainly doesn't appear to be correct.

--
Regards,
Tom Ogilvy


"pikus " wrote in message
...
And as for why, Frank, anything in VBA and the calculation of the sheets
formulas are separate processes. If you're relying on the result of a
formula for part of your code you must tell VBA to calculate it for
you. You could just do the math within your code, but especially when
there are multiple formulas it's easier to do it the other way. - Pikus


---
Message posted from http://www.ExcelForum.com/




pikus

Why can't a calculation and macro execute at the same time?
 
Huh? What's the deal then? I hate it when I'm wrong! Dammit! Pikus
confused. Tom Ogilvy explain. :-)


---
Message posted from http://www.ExcelForum.com/


Katy[_3_]

Why can't a calculation and macro execute at the same time?
 
There are a lot cells that have formulas which causes a 40
sec delay when a task in executed. I wanted to create a
progress bar which would increase while the calculation
was being completed. There probably is a way better way of
doing this, just don't know how.

So your advice would be appriciated =)

-----Original Message-----
Hi
AFAIK not possible. But why do you need this?

--
Regards
Frank Kabel
Frankfurt, Germany


Katy wrote:
Is there ant way of getting around this?

When my sheet is calculating my macro freezes up until

the
calculation is completed on the worksheet, is there any
way I can set up my worksheet so that a calculation and

a
macro can execute at the same time?

.


Tom Ogilvy

Why can't a calculation and macro execute at the same time?
 
to the best of my knowledge and experience, calculation and vba work very
well together. If a vba action causes a calculation to occur, the macro
waits until it is complete to continue. Excel isn't multithreaded from a
VBA and calculation execution standpoint. I can't say there aren't some
bugs that could cause problems, but largely I believe I have represented the
situation. If you code does not perform an action that would cause a
calculation (perhaps calculation is set to manual) and you need a
calculation, then you would need to cause a calculate.

The OP seems to have similar experiences and is trying to create the
situation you described as I read the posts.

--
Regards,
Tom Ogilvy




"pikus " wrote in message
...
Huh? What's the deal then? I hate it when I'm wrong! Dammit! Pikus
confused. Tom Ogilvy explain. :-)


---
Message posted from http://www.ExcelForum.com/




pikus

Why can't a calculation and macro execute at the same time?
 
Thanks... I feel like such a noob! :-

--
Message posted from http://www.ExcelForum.com


Dana DeLouis[_3_]

Why can't a calculation and macro execute at the same time?
 
Here's an article to add to your library:

How Formula Calculations Are Performed in Excel
http://support.microsoft.com/default...12&Product=xlw

HTH
Dana DeLouis

<snip




All times are GMT +1. The time now is 04:08 AM.

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