Application.Volatile Question, HelP!!!

G

Guest

Okay here's my problem,

I have a VBA subroutine (Marco) that I want to run, BUT in my worksheets I
also have functions that I've written (in VBA) that are Application.Volatile.

So when I run the subroutine, Excel also has to re-calculate "all" the
functions in all cells that are in all the worksheets.

What happens is that everything grinds to a halt!

What can I do???

Much Thanks As Always! Kurt

Function TotalPCRs() As Integer

Application.Volatile
 
D

Dave Peterson

I think I'd do my best to remove the application.volatile line and pass the
parms that I need to the UDF.

But if that's not possible, maybe you could disable events, run your code and
enable events.

application.enableevents = false
'your code here
application.enableevents = true
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top