Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My Excel VBA application is slowing down between statements 1

Status
Not open for further replies.

comconrk

Programmer
Jul 15, 2002
55
I have been running this for over a year, but it has just started slowing down. I have isolated the problem to the
statements below, but I can not figure out why they are slow.

Normally there is no time lapse between these statements, but now it takes almost a second to run each one. I do refresh some queries prior to this, but I have been doing that for over a year.

I would appreciate your advice.

Thanks




Mth_Row = Mth_Row + 1
Cells(Mth_Row, 1) = Category
Cells(Mth_Row, 2) = Last_Roll_No
Cells(Mth_Row, 3) = Date_Rec
Cells(Mth_Row, 4) = Total_Qty_On_Hand
Cells(Mth_Row, 5) = Unit_Cost
 
I forgot to mention that this is an Excel macro.

Also, I just ran a test and while running the macro the
CPU usage hovers around 100%. However, when I take this
code out and run it in stripped down version of the spreadsheet, the CPU usage is under 10%.

There must be some overhead that I have in the entire macro, but I certainly am clueless on how to correct it.

Thanks,


 
Skip,

I do have formulas that are calculating.

I also appreciated the faq. I will test this out.

Thanks
 
Skip,

When I remove the references to this worksheet, it speeds up to a normal speed. However, I did set the calculation
to manual, but it did not make a difference.

I set the calcuation to manual instead of automatic at the
worksheet options. Is there a way to do it in the program?

Thanks very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top