The following sub procedure is one of a few located in my module.
The procedure is pretty simple. It writes the elements of an array onto an excel sheet. However, When I run this procedure it is extremely slow. For isntance, I get the " not responding" message whenever I run the procedure. Yet, when I escape from the procedure I can see some rows have been written on the excel sheet. I only have 2500 rows of data it shouldn't be this slow. Also I didn't have this issue when I tested the code a couple of days ago.
What could be causing this issue?
Also I turned off screen updating and auto calculations.
Code:
Sub writetrans()
Sheet3.Activate
For A = 2 To UBound(MainArray2)
Cells(A, 1) = MainArray2(A, 1) '<-- Date
Cells(A, 2) = MainArray2(A, 2) '<-- Description
Cells(A, 3) = MainArray2(A, 8) '<-- Updated Amount
Cells(A, 4) = -MainArray2(A, 9) '<--Running Balance
Cells(A, 5) = MainArray2(A, 10) '<--Updated Category
Cells(A, 6) = MainArray2(A, 7) '<--Accounts
Next A
End Sub
The procedure is pretty simple. It writes the elements of an array onto an excel sheet. However, When I run this procedure it is extremely slow. For isntance, I get the " not responding" message whenever I run the procedure. Yet, when I escape from the procedure I can see some rows have been written on the excel sheet. I only have 2500 rows of data it shouldn't be this slow. Also I didn't have this issue when I tested the code a couple of days ago.
What could be causing this issue?
Also I turned off screen updating and auto calculations.