ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   To reduce the speed of circulation in a range of cells (https://www.excelbanter.com/excel-programming/386041-reduce-speed-circulation-range-cells.html)

Jack clav

To reduce the speed of circulation in a range of cells
 


Jeanmi
Hello,

I have made a program which circulates in a range of cells.
I would like to reduce the speed of execution. I would like that the
selection of the cells don't go so quickly.
Is it possible and what must I do?


Thank you in advance,


Jean-michel






*** Sent via Developersdex http://www.developersdex.com ***

Deborah Digby

To reduce the speed of circulation in a range of cells
 
try putting the information into an array then transferring the contents of
the array to the range. I assume you are using a loop to fill the range.
Loop through the array, then use a statement like:
Range("whatever") = myArray
(this approx 100 times faster than looping through a range)

Obviously, you need to work out the dimensions involved, Redim-ing
dynamically if necessary. Also if the array is one-dimensional you will need
to use application.transpose(myArray)

D



"Jack clav" wrote in message
...


Jeanmi
Hello,

I have made a program which circulates in a range of cells.
I would like to reduce the speed of execution. I would like that the
selection of the cells don't go so quickly.
Is it possible and what must I do?


Thank you in advance,


Jean-michel






*** Sent via Developersdex http://www.developersdex.com ***




urkec

To reduce the speed of circulation in a range of cells
 
You can use the Timer function:

Sub ToggleCells()

sleepTime = 1 'seconds

'toggle active cell 10 times
For i = 1 To 10

If i Mod 2 = 0 Then
Cells(1, 1).Activate
Else
Cells(2, 2).Activate
End If

Start = Timer

Do While Timer < Start + sleepTime
DoEvents
Loop

Next

End Sub

--
urkec


"Jack clav" wrote:



Jeanmi
Hello,

I have made a program which circulates in a range of cells.
I would like to reduce the speed of execution. I would like that the
selection of the cells don't go so quickly.
Is it possible and what must I do?


Thank you in advance,


Jean-michel






*** Sent via Developersdex http://www.developersdex.com ***



All times are GMT +1. The time now is 12:12 PM.

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