Is there a sentence where a macro lets do the full calculation before jumping to the next sentence?

0

Hi, I have a macro where I have to do simulations with the random function, the random function is in a matrix of 75000x12, I understand that excel is saturated with a certain number of records and does not recalculate the whole sheet and jumps to the following statement, there is a sentence where the macro allows the whole sheet to be calculated and then skipped to the next sentence.

    
asked by Hugo 03.01.2018 в 04:59
source

1 answer

1

Try the DoEvents command right after your part of the code where you do the calculation.

DoEvents Information :

  

DoEvents function

     

Allow the execution so that the operating system can process other events. The DoEvents function returns an integer that represents the number of open forms in independent versions of Visual Basic, such as Visual Basic, Professional Edition. DoEvents returns zero in all other applications. DoEvents passes control to the operating system. Control is returned after the operating system has finished processing the events in its queue and all keys have been sent from the SendKeys queue. DoEvents is more useful for simple processes such as allowing a user to cancel a process when it has already started, for example searching for a file. For long-duration processes, revealing the processor is best achieved by using a timer or delegating the task to an ActiveX EXE component.

    
answered by 04.02.2018 в 03:18