• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

General Question Regarding Running Modules In Sequence

I have several modules that run together:


Sub Sequenced_Modules()

SubModule1

SubModule2

SubModule3 etc..

End Sub


When Module2 is ran by itself, it takes only 10 seconds (I tested it by itself).


But when it's ran together in sequence with the others, then Module 2 can take up to 5 minutes!?


I'm stuck and I'm not sure why this is happening. I made sure my screenupdating was off through every module.


I would post my code (but it's far too much), I was hoping to just post this general question regarding my issue in hopes that someone knows off hand what the problem obviously is.


I'm sure Module2 is the problem (it's the longest bit of code, and the other two modules finish tip top in 3 seconds).
 
Never mind guys I never looked at the bottom.


It was selecting the whole column.


I used this to only snatch up my selected cells a few pieces of the column.


Set MyRange = Range("A2", Range("A65536").End(xlUp))

With ActiveSheet

Range("A1", Range("A65536").End(xlUp)).AutoFilter Field:=1, Criteria1:="=*.*"

MyRange.SpecialCells(xlCellTypeVisible).Select

End With


If anyone started on this one for me I appreciate your help but I got it thanks.


Resolved! :)
 
Use a timer or even a messagebox at the start & end of each module so that you can at least narrow it down
 
Back
Top