Excel VBA - Extra Sheets cause my VBA to run slower -


i have macro runs fast when run vba sub/function interacts 2 sheets, when add others sheets have nothing sub calculation, sub takes 10x longer executed. i've trying disable others sheets sub/function faster again, couldn't find solution. me ?? in advance.

that's part of code gets slower other sheets added :

dim i, j, k integer 'fluxo de caixa iterators = 11 j = 10 'db interators k = 2 'cachflowref row rowreference = range("cashflowref").row  debug.print timer.timeelapsed  until cells(i, 2) = "t"     if cells(i, 2) <> ""         until cells(rowreference, j).value = ""             if cells(i, j).value <> 0                sheets("fluxo_db")                 .cells(k, 1).value = cells(i, 2).value 'tipo                 .cells(k, 2).value = cells(i, 3).value 'plano de contas                 .cells(k, 3).value = cells(i, j).value 'valor                 .cells(k, 4).value = cells(3, j).value 'data                 .cells(k, 5).value = gettrimestre(cells(10, j).value) 'trimestre                 .cells(k, 6).value = year(cells(10, j).value) 'ano               end                k = k + 1             end if             j = j + 1         loop      end if     j = 10     = + 1 loop  debug.print timer.timeelapsed 

add application.calculation = xlmanual start of code

and add application.calculation = xlautomatic end.


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -