+ Reply to Thread
Results 1 to 9 of 9

Macro that loops through some worksheets stops after some time

Hybrid View

  1. #1
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Macro that loops through some worksheets stops after some time

    Hi there,

    I have a macro that loops through a few worksheets for use as a presentation on screen but apparently it doesnt continue after a few hours and stays in the same sheet after some time.

    Attached is the macro that I've used.

    Macro.txt

  2. #2
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Macro that loops through some worksheets stops after some time

    it seems that the macro stops whenever the "slideshow" cross to another day.

  3. #3
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Macro that loops through some worksheets stops after some time

    This is part 2
    Start = Timer
    Sheets("Display 2").Select
    ActiveWindow.Zoom = 33 ' size the display
    
    If Cells(3, 23) > Cells(8, 23) Then
    Cells(3, 22).Interior.Color = 3407718
    Cells(3, 26).Interior.Color = 3407718
    Cells(3, 27).Interior.Color = 3407718
    End If
    
    If Cells(3, 23) < Cells(8, 23) Then
    Cells(3, 22).Interior.Color = 255
    Cells(3, 26).Interior.Color = 255
    Cells(3, 27).Interior.Color = 255
    End If
    
    If Cells(12, 23) > Cells(18, 23) Then
    Cells(12, 22).Interior.Color = 3407718
    Cells(12, 26).Interior.Color = 3407718
    Cells(12, 27).Interior.Color = 3407718
    End If
    
    If Cells(12, 23) < Cells(18, 23) Then
    Cells(12, 22).Interior.Color = 255
    Cells(12, 26).Interior.Color = 255
    Cells(12, 27).Interior.Color = 255
    End If
    
    If Cells(7, 3) < Cells(11, 5) Then
    Cells(6, 3).Interior.Color = 3407718
    Cells(10, 3).Interior.Color = 3407718
    End If
    
    If Cells(7, 3) > Cells(11, 5) Then
    Cells(6, 3).Interior.Color = 255
    Cells(10, 3).Interior.Color = 255
    End If
    
    If Cells(10, 8) > 0 Then
        For I = 6 To 9
            For J = 6 To 9
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(10, 6).Interior.Color = 255
        Cells(10, 7).Interior.Color = 255
        Cells(10, 9).Interior.Color = 255
    End If
    If Cells(10, 8) = 0 Then
        For I = 6 To 9
            For J = 6 To 9
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(10, 6).Interior.Color = 3407718
        Cells(10, 7).Interior.Color = 3407718
        Cells(10, 9).Interior.Color = 3407718
    End If
    
    
    If Cells(7, 13) > Cells(11, 15) Then
    Cells(6, 13).Interior.Color = 255
    Cells(10, 13).Interior.Color = 255
    End If
    
    
    If Cells(10, 18) > 0 Then
        For I = 6 To 9
            For J = 16 To 19
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(12, 17).Interior.Color = 255
        Cells(12, 18).Interior.Color = 255
        Cells(12, 20).Interior.Color = 255
    End If
    
    
    If Cells(17, 3) = Cells(23, 5) Then
    Cells(16, 3).Interior.Color = 3407718
    Cells(21, 3).Interior.Color = 3407718
    End If
    
    If Cells(17, 3) < Cells(8, 34) And Cells(17, 3) > Cells(23, 5) Then
    Cells(16, 3).Interior.Color = 65535
    Cells(21, 3).Interior.Color = 65535
    End If
    
    If Cells(17, 3) > Cells(8, 34) Then
    Cells(16, 3).Interior.Color = 255
    Cells(21, 3).Interior.Color = 255
    End If
    
    If Cells(19, 8) = Cells(23, 5) Then
        For I = 16 To 18
            For J = 6 To 9
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(19, 6).Interior.Color = 3407718
        Cells(19, 7).Interior.Color = 3407718
        Cells(19, 9).Interior.Color = 3407718
        Cells(20, 6).Interior.Color = 3407718
        Cells(20, 7).Interior.Color = 3407718
        Cells(20, 8).Interior.Color = 3407718
        Cells(20, 9).Interior.Color = 3407718
        Cells(21, 6).Interior.Color = 3407718
        Cells(21, 7).Interior.Color = 3407718
        Cells(21, 8).Interior.Color = 3407718
        Cells(21, 9).Interior.Color = 3407718
        Cells(22, 6).Interior.Color = 3407718
        Cells(22, 7).Interior.Color = 3407718
        Cells(22, 8).Interior.Color = 3407718
        Cells(22, 9).Interior.Color = 3407718
    End If
    
    If Cells(19, 8) > Cells(23, 5) And Cells(19, 8) < Cells(8, 34) Then
        For I = 16 To 18
            For J = 6 To 9
            Cells(I, J).Interior.Color = 65535
            Next
        Next
        Cells(19, 6).Interior.Color = 65535
        Cells(19, 7).Interior.Color = 65535
        Cells(19, 9).Interior.Color = 65535
        Cells(20, 6).Interior.Color = 65535
        Cells(20, 7).Interior.Color = 65535
        Cells(20, 8).Interior.Color = 65535
        Cells(20, 9).Interior.Color = 65535
        Cells(21, 6).Interior.Color = 65535
        Cells(21, 7).Interior.Color = 65535
        Cells(21, 8).Interior.Color = 65535
        Cells(21, 9).Interior.Color = 65535
        Cells(22, 6).Interior.Color = 65535
        Cells(22, 7).Interior.Color = 65535
        Cells(22, 8).Interior.Color = 65535
        Cells(22, 9).Interior.Color = 65535
    End If
    
    If Cells(19, 8) > Cells(8, 34) Then
        For I = 16 To 18
            For J = 6 To 9
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(19, 6).Interior.Color = 255
        Cells(19, 7).Interior.Color = 255
        Cells(19, 9).Interior.Color = 255
        Cells(20, 6).Interior.Color = 255
        Cells(20, 7).Interior.Color = 255
        Cells(20, 8).Interior.Color = 255
        Cells(20, 9).Interior.Color = 255
        Cells(21, 6).Interior.Color = 255
        Cells(21, 7).Interior.Color = 255
        Cells(21, 8).Interior.Color = 255
        Cells(21, 9).Interior.Color = 255
        Cells(22, 6).Interior.Color = 255
        Cells(22, 7).Interior.Color = 255
        Cells(22, 8).Interior.Color = 255
        Cells(22, 9).Interior.Color = 255
    End If
    
    If Cells(17, 13) < Cells(23, 15) Then
    Cells(16, 13).Interior.Color = 3407718
    Cells(21, 13).Interior.Color = 3407718
    End If
    
    If Cells(17, 13) > Cells(23, 15) Then
    Cells(16, 13).Interior.Color = 255
    Cells(21, 13).Interior.Color = 255
    End If
    
    If Cells(21, 18) > 0 Then
        For I = 16 To 20
            For J = 16 To 19
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(21, 16).Interior.Color = 3407718
        Cells(21, 17).Interior.Color = 3407718
        Cells(21, 19).Interior.Color = 3407718
        Cells(22, 16).Interior.Color = 3407718
        Cells(22, 17).Interior.Color = 3407718
        Cells(22, 18).Interior.Color = 3407718
        Cells(22, 19).Interior.Color = 3407718
    End If
    
    If Cells(21, 18) = 0 Then
        For I = 16 To 20
            For J = 16 To 19
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(21, 16).Interior.Color = 255
        Cells(21, 17).Interior.Color = 255
        Cells(21, 19).Interior.Color = 255
        Cells(22, 16).Interior.Color = 255
        Cells(22, 17).Interior.Color = 255
        Cells(22, 18).Interior.Color = 255
        Cells(22, 19).Interior.Color = 255
    End If
      
    
    If Cells(28, 3) < Cells(32, 5) Then
    Cells(27, 3).Interior.Color = 3407718
    Cells(30, 3).Interior.Color = 3407718
    End If
    
    If Cells(28, 3) > Cells(32, 5) And Cells(28, 3) < Cells(11, 34) Then
    Cells(27, 3).Interior.Color = 65535
    Cells(30, 3).Interior.Color = 65535
    End If
    
    If Cells(28, 3) > Cells(11, 34) Then
    Cells(27, 3).Interior.Color = 255
    Cells(30, 3).Interior.Color = 255
    End If
    
    
    If Cells(28, 8) < Cells(32, 5) Then
        For I = 29 To 30
            For J = 6 To 9
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(27, 6).Interior.Color = 3407718
        Cells(27, 7).Interior.Color = 3407718
        Cells(27, 9).Interior.Color = 3407718
        Cells(28, 6).Interior.Color = 3407718
        Cells(28, 7).Interior.Color = 3407718
        Cells(28, 8).Interior.Color = 3407718
        Cells(28, 9).Interior.Color = 3407718
    End If
    
    If Cells(28, 8) > Cells(32, 5) And Cells(28, 8) < Cells(11, 34) Then
        For I = 29 To 30
            For J = 6 To 9
            Cells(I, J).Interior.Color = 65535
            Next
        Next
        Cells(27, 6).Interior.Color = 65535
        Cells(27, 7).Interior.Color = 65535
        Cells(27, 9).Interior.Color = 65535
        Cells(28, 6).Interior.Color = 65535
        Cells(28, 7).Interior.Color = 65535
        Cells(28, 8).Interior.Color = 65535
        Cells(28, 9).Interior.Color = 65535
    End If
    
    If Cells(28, 8) > Cells(11, 34) Then
        For I = 29 To 30
            For J = 6 To 9
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(27, 6).Interior.Color = 255
        Cells(27, 7).Interior.Color = 255
        Cells(27, 9).Interior.Color = 255
        Cells(28, 6).Interior.Color = 255
        Cells(28, 7).Interior.Color = 255
        Cells(28, 8).Interior.Color = 255
        Cells(28, 9).Interior.Color = 255
    End If
    
    
    Do While Timer < Start + 60
    DoEvents
    Loop

  4. #4
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Macro that loops through some worksheets stops after some time

    And Part 3:

    Start = Timer
    Sheets("Display 3").Select
    ActiveWindow.Zoom = 33 ' size the display
    
    If Cells(3, 24) > Cells(9, 24) Then
    Cells(3, 23).Interior.Color = 3407718
    Cells(3, 27).Interior.Color = 3407718
    Cells(3, 28).Interior.Color = 3407718
    End If
    
    If Cells(3, 24) < Cells(9, 24) Then
    Cells(3, 23).Interior.Color = 255
    Cells(3, 27).Interior.Color = 255
    Cells(3, 28).Interior.Color = 255
    End If
    
    If Cells(14, 24) > Cells(20, 24) Then
    Cells(14, 23).Interior.Color = 3407718
    Cells(14, 27).Interior.Color = 3407718
    Cells(14, 28).Interior.Color = 3407718
    End If
    
    If Cells(14, 24) < Cells(20, 24) Then
    Cells(14, 23).Interior.Color = 255
    Cells(14, 27).Interior.Color = 255
    Cells(14, 28).Interior.Color = 255
    End If
    
    If Cells(9, 3) < Cells(13, 5) Then
    Cells(8, 3).Interior.Color = 3407718
    Cells(12, 3).Interior.Color = 3407718
    End If
    
    If Cells(9, 3) > Cells(13, 5) And Cells(9, 3) < Cells(8, 39) Then
    Cells(8, 3).Interior.Color = 65535
    Cells(12, 3).Interior.Color = 65535
    End If
    
    If Cells(9, 3) > Cells(8, 39) Then
    Cells(8, 3).Interior.Color = 255
    Cells(12, 3).Interior.Color = 255
    End If
    
    If Cells(9, 8) > Cells(8, 39) Then
        For I = 10 To 12
            For J = 6 To 9
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(8, 6).Interior.Color = 255
        Cells(8, 7).Interior.Color = 255
        Cells(8, 8).Interior.Color = 255
        Cells(8, 9).Interior.Color = 255
        Cells(9, 6).Interior.Color = 255
        Cells(9, 7).Interior.Color = 255
        Cells(9, 9).Interior.Color = 255
    End If
    
    
    If Cells(9, 8) > Cells(13, 5) And Cells(9, 8) < Cells(8, 39) Then
        For I = 10 To 12
            For J = 6 To 9
            Cells(I, J).Interior.Color = 65535
            Next
        Next
        Cells(8, 6).Interior.Color = 65535
        Cells(8, 7).Interior.Color = 65535
        Cells(8, 8).Interior.Color = 65535
        Cells(8, 9).Interior.Color = 65535
        Cells(9, 6).Interior.Color = 65535
        Cells(9, 7).Interior.Color = 65535
        Cells(9, 9).Interior.Color = 65535
    End If
    
    If Cells(9, 8) < Cells(13, 5) Then
        For I = 10 To 12
            For J = 6 To 9
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(8, 6).Interior.Color = 3407718
        Cells(8, 7).Interior.Color = 3407718
        Cells(8, 8).Interior.Color = 3407718
        Cells(8, 9).Interior.Color = 3407718
        Cells(9, 6).Interior.Color = 3407718
        Cells(9, 7).Interior.Color = 3407718
        Cells(9, 9).Interior.Color = 3407718
    End If
    
    
    
    If Cells(9, 13) < Cells(13, 15) Then
    Cells(8, 13).Interior.Color = 3407718
    Cells(12, 13).Interior.Color = 3407718
    End If
    
    If Cells(9, 14) > Cells(13, 15) Then
    Cells(8, 13).Interior.Color = 255
    Cells(12, 13).Interior.Color = 255
    End If
    
    If Cells(12, 18) > 0 Then
        For I = 7 To 11
            For J = 16 To 19
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(12, 16).Interior.Color = 255
        Cells(12, 17).Interior.Color = 255
        Cells(12, 19).Interior.Color = 255
    End If
    If Cells(12, 18) = 0 Then
        For I = 7 To 11
            For J = 16 To 19
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(12, 16).Interior.Color = 3407718
        Cells(12, 17).Interior.Color = 3407718
        Cells(12, 19).Interior.Color = 3407718
    End If
    
    If Cells(19, 3) < 0.5 Then
    Cells(18, 3).Interior.Color = 3407718
    Cells(22, 3).Interior.Color = 3407718
    End If
    
    If Cells(19, 3) > 0.5 Then
    Cells(18, 3).Interior.Color = 255
    Cells(22, 3).Interior.Color = 255
    End If
    
    
    If Cells(22, 8) < 0 Then
        For I = 18 To 21
            For J = 6 To 9
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(22, 6).Interior.Color = 255
        Cells(22, 7).Interior.Color = 255
        Cells(22, 9).Interior.Color = 255
        Cells(23, 6).Interior.Color = 255
        Cells(23, 7).Interior.Color = 255
        Cells(23, 8).Interior.Color = 255
        Cells(23, 9).Interior.Color = 255
    End If
    If Cells(22, 8) = 0 Then
        For I = 18 To 21
            For J = 6 To 9
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(22, 6).Interior.Color = 3407718
        Cells(22, 7).Interior.Color = 3407718
        Cells(22, 9).Interior.Color = 3407718
        Cells(23, 6).Interior.Color = 3407718
        Cells(23, 7).Interior.Color = 3407718
        Cells(23, 8).Interior.Color = 3407718
        Cells(23, 9).Interior.Color = 3407718
    End If
    
    If Cells(19, 13) < Cells(24, 15) Then
    Cells(18, 13).Interior.Color = 3407718
    Cells(22, 13).Interior.Color = 3407718
    End If
    
    If Cells(19, 13) > Cells(24, 15) Then
    Cells(18, 13).Interior.Color = 255
    Cells(22, 13).Interior.Color = 255
    End If
    
    
    If Cells(22, 18) > 0 Then
        For I = 18 To 21
            For J = 16 To 19
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(22, 16).Interior.Color = 3407718
        Cells(22, 17).Interior.Color = 3407718
        Cells(22, 19).Interior.Color = 3407718
        Cells(23, 16).Interior.Color = 3407718
        Cells(23, 17).Interior.Color = 3407718
        Cells(23, 18).Interior.Color = 3407718
        Cells(23, 19).Interior.Color = 3407718
    End If
    
    If Cells(22, 18) < 0 Then
        For I = 18 To 21
            For J = 16 To 19
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(22, 16).Interior.Color = 255
        Cells(22, 17).Interior.Color = 255
        Cells(22, 19).Interior.Color = 255
        Cells(23, 16).Interior.Color = 255
        Cells(23, 17).Interior.Color = 255
        Cells(23, 18).Interior.Color = 255
        Cells(23, 19).Interior.Color = 255
    End If
    
    If Cells(29, 3) < Cells(33, 5) Then
    Cells(28, 3).Interior.Color = 3407718
    Cells(32, 3).Interior.Color = 3407718
    End If
    
    If Cells(29, 3) > Cells(33, 5) Then
    Cells(28, 3).Interior.Color = 255
    Cells(32, 3).Interior.Color = 255
    End If
    
    
    If Cells(31, 8) < 0 Then
        For I = 28 To 30
            For J = 6 To 9
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(31, 6).Interior.Color = 255
        Cells(31, 7).Interior.Color = 255
        Cells(31, 9).Interior.Color = 255
    End If
    If Cells(31, 8) = 0 Then
        For I = 28 To 30
            For J = 6 To 9
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(31, 6).Interior.Color = 3407718
        Cells(31, 7).Interior.Color = 3407718
        Cells(31, 9).Interior.Color = 3407718
    End If
    
    If Cells(29, 13) < Cells(33, 15) Then
    Cells(28, 13).Interior.Color = 3407718
    Cells(32, 13).Interior.Color = 3407718
    End If
    
    If Cells(29, 13) > Cells(33, 15) Then
    Cells(28, 13).Interior.Color = 255
    Cells(32, 13).Interior.Color = 255
    End If
    
    
    If Cells(31, 18) > 0 Then
        For I = 28 To 30
            For J = 16 To 19
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(31, 16).Interior.Color = 255
        Cells(31, 17).Interior.Color = 255
        Cells(31, 19).Interior.Color = 255
    End If
    If Cells(31, 18) = 0 Then
        For I = 28 To 30
            For J = 16 To 19
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(31, 16).Interior.Color = 3407718
        Cells(31, 17).Interior.Color = 3407718
        Cells(31, 19).Interior.Color = 3407718
    End If
    
    Do While Timer < Start + 60
    DoEvents
    Loop
    
        
    
    GoTo 10
        
    End Sub

  5. #5
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Macro that loops through some worksheets stops after some time

    Need help...
    Urgent..

  6. #6
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Macro that loops through some worksheets stops after some time

    Part 1 if the code:

    Sub Macro1()
    Dim I, II, J, JJ As Integer
    Dim Cellcolour
    
    10 I = 1
    
    Start = Timer
    Sheets("Display 0").Select
    ActiveWindow.Zoom = 33 ' size the display
    
    If Cells(14, 8) > Cells(10, 43) Then
    Cells(14, 11).Interior.Color = 255
    End If
    
    If Cells(14, 8) < Cells(10, 43) And Cells(14, 8) > Cells(10, 41) Then
    Cells(14, 11).Interior.Color = 65535
    End If
    
    If Cells(14, 8) < Cells(10, 41) Then
    Cells(14, 11).Interior.Color = 3407718
    End If
    
    If Cells(16, 8) > Cells(11, 43) Then
    Cells(16, 11).Interior.Color = 255
    End If
    
    If Cells(16, 8) < Cells(11, 43) And Cells(16, 8) > Cells(11, 41) Then
    Cells(16, 11).Interior.Color = 65535
    End If
    
    If Cells(16, 8) < Cells(11, 41) Then
    Cells(16, 11).Interior.Color = 3407718
    End If
    
    
    If Cells(18, 8) > Cells(12, 43) Then
    Cells(18, 11).Interior.Color = 255
    End If
    
    If Cells(18, 8) < Cells(12, 43) And Cells(18, 8) > Cells(12, 41) Then
    Cells(18, 11).Interior.Color = 65535
    End If
    
    If Cells(18, 8) < Cells(12, 41) Then
    Cells(18, 11).Interior.Color = 3407718
    End If
    
    
    Do While Timer < Start + 60
    DoEvents
    Loop
    
    Start = Timer
    Sheets("Display 1").Select
    ActiveWindow.Zoom = 33 ' size the display
    
    If Cells(3, 25) > Cells(9, 25) Then
    Cells(3, 24).Interior.Color = 3407718
    Cells(3, 28).Interior.Color = 3407718
    Cells(3, 29).Interior.Color = 3407718
    End If
    
    If Cells(3, 25) < Cells(9, 25) Then
    Cells(3, 24).Interior.Color = 255
    Cells(3, 28).Interior.Color = 255
    Cells(3, 29).Interior.Color = 255
    End If
    
    If Cells(14, 25) > Cells(20, 25) Then
    Cells(14, 24).Interior.Color = 3407718
    Cells(14, 28).Interior.Color = 3407718
    Cells(14, 29).Interior.Color = 3407718
    End If
    
    If Cells(14, 25) < Cells(20, 25) Then
    Cells(14, 24).Interior.Color = 255
    Cells(14, 28).Interior.Color = 255
    Cells(14, 29).Interior.Color = 255
    End If
    
    If Cells(8, 3) > Cells(13, 5) Then
    Cells(7, 3).Interior.Color = 3407718
    Cells(12, 3).Interior.Color = 3407718
    End If
    
    If Cells(8, 3) < Cells(13, 5) Then
    Cells(7, 3).Interior.Color = 255
    Cells(12, 3).Interior.Color = 255
    End If
    
    If Cells(12, 8) < 0 Then
        For I = 7 To 11
            For J = 6 To 9
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(12, 6).Interior.Color = 255
        Cells(12, 7).Interior.Color = 255
        Cells(12, 9).Interior.Color = 255
    
    End If
    If Cells(12, 8) > 0 Then
        For I = 7 To 11
            For J = 6 To 9
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(12, 6).Interior.Color = 3407718
        Cells(12, 7).Interior.Color = 3407718
        Cells(12, 9).Interior.Color = 3407718
    End If
    
    If Cells(8, 14) > Cells(13, 16) Then
    Cells(7, 14).Interior.Color = 3407718
    Cells(12, 14).Interior.Color = 3407718
    End If
    
    If Cells(8, 14) < Cells(13, 16) Then
    Cells(7, 14).Interior.Color = 255
    Cells(12, 14).Interior.Color = 255
    End If
    
    If Cells(12, 19) < 0 Then
        For I = 7 To 11
            For J = 17 To 20
            Cells(I, J).Interior.Color = 255
            Next
        Next
        Cells(12, 17).Interior.Color = 255
        Cells(12, 18).Interior.Color = 255
        Cells(12, 20).Interior.Color = 255
    End If
    If Cells(12, 19) > 0 Then
        For I = 7 To 11
            For J = 17 To 20
            Cells(I, J).Interior.Color = 3407718
            Next
        Next
        Cells(12, 17).Interior.Color = 3407718
        Cells(12, 18).Interior.Color = 3407718
        Cells(12, 20).Interior.Color = 3407718
    End If
    
    
    
    Do While Timer < Start + 60
    DoEvents
    Loop

  7. #7
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Macro that loops through some worksheets stops after some time

    bump bump bump

  8. #8
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Macro that loops through some worksheets stops after some time

    hi there
    can anyone help?

  9. #9
    Registered User
    Join Date
    09-02-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    60

    Re: Macro that loops through some worksheets stops after some time

    bump..........

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1