samisamih
04-21-2015, 04:13 AM
Hi ,
i have problem with my macro that there is slowdown in performance when I write the result of the macro in cell.
my code is :
Public n1 As Integer
Public changeflag as boolean
public st as string
dim arr(1 to 10) as integer
Private Sub Worksheet_Change(ByVal Target As Range)
If changeflag = true then exit sub
changeflag = true
If Cells(1, 1).Value <> st Then
st = Cells(1, 1).Value
n1 = n1 + 1
End If
arr(n1)=*number* related to other macro...............
cells(n1,2).value=arr(n1)
Changeflag = false
End Sub
the problem in " cells(n1,2).value=arr(n1) " the result i get in the cell is printed in delay which cause to be miss data sometimes(its happend when there is very fast update of data)
i tried to add the command "application.screenupdating=false/true" at the Beginning and the end but did not help.
is there a way to display the arry value in the cell without delay data , without using msgbox .?
best regards
i have problem with my macro that there is slowdown in performance when I write the result of the macro in cell.
my code is :
Public n1 As Integer
Public changeflag as boolean
public st as string
dim arr(1 to 10) as integer
Private Sub Worksheet_Change(ByVal Target As Range)
If changeflag = true then exit sub
changeflag = true
If Cells(1, 1).Value <> st Then
st = Cells(1, 1).Value
n1 = n1 + 1
End If
arr(n1)=*number* related to other macro...............
cells(n1,2).value=arr(n1)
Changeflag = false
End Sub
the problem in " cells(n1,2).value=arr(n1) " the result i get in the cell is printed in delay which cause to be miss data sometimes(its happend when there is very fast update of data)
i tried to add the command "application.screenupdating=false/true" at the Beginning and the end but did not help.
is there a way to display the arry value in the cell without delay data , without using msgbox .?
best regards