Home |
Search |
Today's Posts |
#2
![]() |
|||
|
|||
![]()
Personally I would just add an error handler to it. Added screenupdating =false and noticed a bit of a speed improvement he
Sub STEP3TEST() Application.Wait Now + TimeValue("00:00:03") Dim Curr_Base As Long Dim Prev_Base As Long Dim i As Long Dim Loop_Count As Long With Application .ScreenUpdating = False On Error GoTo ErrHandle ActiveWindow.Activate Loop_Count = Range(Selection, Selection.End(xlDown)).Count 'MsgBox Loop_Count For i = 3 To Loop_Count Range("E" & i).Select Curr_Base = ActiveWindow.ActiveCell 'MsgBox Curr_Base If (Curr_Base = Prev_Base) Then ActiveWindow.SelectedSheets.HPageBreaks.Add befo=ActiveCell End If Prev_Base = Curr_Base Next i ErrorExit: .ScreenUpdating = True End With Exit Sub ErrHandle: MsgBox "Limit Reached" GoTo ErrorExit End Sub Quote:
__________________
Justin Labenne www.jlxl.net Last edited by JustinLabenne : June 7th 05 at 01:34 AM |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
time differences in a column | Excel Worksheet Functions | |||
Time Sheet Calculation Help Needed! | Excel Worksheet Functions | |||
Time Sheets | Excel Discussion (Misc queries) | |||
unmet challenge | Excel Worksheet Functions | |||
time formatting and time categorizing (vlookup or data validation) | Excel Worksheet Functions |