+ Reply to Thread + Post New Thread
Results 1 to 1 of 1

Niet omlaag maar naar rechts

Hybrid View

  1. #1
    Registered User
    Join Date
    01-06-2017
    Location
    Amersfoort
    MS-Off Ver
    Office 2016
    Posts
    1

    Niet omlaag maar naar rechts

    Hallo allemaal,

    Ik wil gebruik maken van de onderstaande timer maar deze gaat nu automatisch bij een nieuwe meeting telkens 1 regel omlaag.
    Weet iemand hoe ik het voor elkaar krijg dat het in plaats van omlaag 1 cel opschuift naar rechts?

    copy to clipboard
    Dim NextTick As Date, t As Date, PreviousTimerValue As Date
    
    Sub StartTime()
    PreviousTimerValue = Calculations.Range("A1").Value
    t = Time
    Call ExcelStopWatch
    End Sub
    
    Private Sub ExcelStopWatch()
    Calculations.Range("A1").Value = Format(Time - t + PreviousTimerValue, "hh:mm:ss")
    NextTick = Now + TimeValue("00:00:01")
    If Calculations.Range("A1").Value > Calculations.Range("B3") And Calculations.Range("A1").Value <= Calculations.Range("B4") Then
        With StopWatch.Shapes("TimeBox")
            .Fill.ForeColor.RGB = RGB(255, 255, 255)
        End With
        
    Else
        If Calculations.Range("A1").Value > Calculations.Range("B4") And Calculations.Range("A1").Value <= Calculations.Range("B5") Then
        With StopWatch.Shapes("TimeBox")
            .Fill.ForeColor.RGB = RGB(255, 255, 255)
        End With
        
    Else
        If Calculations.Range("A1").Value > Calculations.Range("B5") Then
        With StopWatch.Shapes("TimeBox")
            .Fill.ForeColor.RGB = RGB(255, 255, 255)
        End With
    End If
    End If
    End If
    
    
    Application.OnTime NextTick, "ExcelStopWatch"
    End Sub
    
    Sub StopClock()
    On Error Resume Next
    Application.OnTime earliesttime:=NextTick, procedure:="ExcelStopWatch", schedule:=False
    End Sub
    
    Sub Reset()
    On Error Resume Next
    
    With StopWatch.Shapes("TimeBox")
            .Fill.ForeColor.RGB = RGB(255, 255, 255)
        End With
    
    
    If StopWatch.Range("F3") = "" And Calculations.Range("A1").Value > 0 Then
        StopWatch.Range("F3").Value = 1
        StopWatch.Range("F3").Offset(0, 1).Value = Calculations.Range("A1").Value
    Else:
        StopWatch.Range("F2").End(xlDown).Offset(1, 0).Value = StopWatch.Range("F2").End(xlDown).Value + 1
        StopWatch.Range("F2").Offset(0, 1).End(xlDown).Offset(1, 0).Value = Calculations.Range("A1").Value
    End If
    Application.OnTime earliesttime:=NextTick, procedure:="ExcelStopWatch", schedule:=False
    Calculations.Range("A1").Value = 0
    End Sub
    Alvast bedankt,
    Bandit
    Attached Files Attached Files

+ Reply to Thread + Post New 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