I am getting a Type Mismatch error on this line; If TimeValue(currentTime) >= TimeValue(timePeriods(rangeIndex)) And TimeValue(currentTime) < TimeValue(timePeriods(rangeIndex + 1)) Then
In the following event:
Private Sub Worksheet_Activate()
    Call CopyPA ' Call the CopyPA code
    Application.Calculate ' Perform calculations after the data is copied
End Sub

Sub CopyPA()
    Dim today As String
    today = Format(Now, "ddd") ' Get the current day
    ' Define the source and destination ranges
    Dim sourceRange As Range
    Dim destRange As Range
    Set sourceRange = Worksheets("PA").Range("A3:P3") ' Source range in the "PA" sheet
    ' Destination range in the "Daily" sheet
    ' Adjust the row number (3) according to your requirements
    Set destRange = Worksheets("Daily").Range("D3:S3")
    ' Clear the destination range and copy the format from the source range
    destRange.ClearContents
    sourceRange.Copy
    destRange.PasteSpecial Paste:=xlPasteFormats
    ' Copy the data from the source range to the destination range based on the current day
    Select Case today
        Case "Mon"
            sourceRange.Copy destRange
        Case "Tue"
            sourceRange.Offset(1).Copy destRange
        Case "Wed"
            sourceRange.Offset(2).Copy destRange
        Case "Thu"
            sourceRange.Offset(3).Copy destRange
        Case "Fri"
            sourceRange.Offset(4).Copy destRange
    End Select
    Application.CutCopyMode = False ' Clear the copy mode
    Call CopyAA
End Sub

Sub CopyAA()
    Dim today As String
    today = Format(Now, "ddd")
    Dim sourceRange As Range
    Dim destRange As Range
    Set sourceRange = Worksheets("AA").Range("A3:L3") ' Source range in the "PA" sheet
    Set destRange = Worksheets("Daily").Range("A9:L9")
    destRange.ClearContents
    sourceRange.Copy
    destRange.PasteSpecial Paste:=xlPasteFormats
    Select Case today
        Case "Mon"
            sourceRange.Copy destRange
        Case "Tue"
            sourceRange.Offset(1).Copy destRange
        Case "Wed"
            sourceRange.Offset(2).Copy destRange
        Case "Thu"
            sourceRange.Offset(3).Copy destRange
        Case "Fri"
            sourceRange.Offset(4).Copy destRange
    End Select
    Application.CutCopyMode = False
    Call CopyCL
End Sub

Sub CopyCL()
    Dim today As String
    today = Format(Now, "ddd")
    Dim sourceRange As Range
    Dim destRange As Range
    Set sourceRange = Worksheets("CL").Range("A3:O3") ' Source range in the "CL" sheet
    Set destRange = Worksheets("Daily").Range("F15:T15")
    destRange.ClearContents
    sourceRange.Copy
    destRange.PasteSpecial Paste:=xlPasteFormats
    Select Case today
        Case "Mon"
            sourceRange.Copy destRange
        Case "Tue"
            sourceRange.Offset(1).Copy destRange
        Case "Wed"
            sourceRange.Offset(2).Copy destRange
        Case "Thu"
            sourceRange.Offset(3).Copy destRange
        Case "Fri"
            sourceRange.Offset(4).Copy destRange
    End Select
    Application.CutCopyMode = False
    Call ShowTime
End Sub

Sub ShowTime()
    Dim currentTime As Date
    currentTime = Now ' Get the current time
    ' Define the ranges and their corresponding time periods
    Dim ranges(27) As Range
    Dim timePeriods(10) As String
    ' Assign the worksheet and ranges
    Dim ws As Worksheet
    Set ws = ThisWorkbook.Worksheets("Daily") ' Replace "Daily" with your sheet name
    Set ranges(1) = ws.Range("C5:D6")
    Set ranges(2) = ws.Range("C11:D12")
    Set ranges(3) = ws.Range("C17:D18")
    Set ranges(4) = ws.Range("E5:F6")
    Set ranges(5) = ws.Range("E11:F12")
    Set ranges(6) = ws.Range("E17:F18")
    Set ranges(7) = ws.Range("G5:H6")
    Set ranges(8) = ws.Range("G11:H12")
    Set ranges(9) = ws.Range("G17:H18")
    Set ranges(10) = ws.Range("I5:J6")
    Set ranges(11) = ws.Range("I11:J12")
    Set ranges(12) = ws.Range("I17:J18")
    Set ranges(13) = ws.Range("K5:L6")
    Set ranges(14) = ws.Range("K11:L12")
    Set ranges(15) = ws.Range("K17:L18")
    Set ranges(16) = ws.Range("M5:N6")
    Set ranges(17) = ws.Range("M11:N12")
    Set ranges(18) = ws.Range("M17:N18")
    Set ranges(19) = ws.Range("O5:P6")
    Set ranges(20) = ws.Range("O11:P12")
    Set ranges(21) = ws.Range("O17:P18")
    Set ranges(22) = ws.Range("Q5:R6")
    Set ranges(23) = ws.Range("Q11:R12")
    Set ranges(24) = ws.Range("Q17:R18")
    Set ranges(25) = ws.Range("S5:T6")
    Set ranges(26) = ws.Range("S11:T12")
    Set ranges(27) = ws.Range("S17:T18")
    timePeriods(1) = "06:59:59" ' 6:59am - before any time period"
    timePeriods(2) = "08:00:00" ' 8am"
    timePeriods(3) = "09:00:00" ' 9am"
    timePeriods(4) = "10:00:00" ' 10am"
    timePeriods(5) = "11:00:00" ' 11am"
    timePeriods(6) = "12:00:00" ' 12pm"
    timePeriods(7) = "13:00:00" ' 1pm"
    timePeriods(8) = "14:00:00" ' 2pm"
    timePeriods(9) = "15:00:00" ' 3pm"
    timePeriods(10) = "16:00:00" ' 4pm - after all time periods"
    
    ' Loop through the ranges and check if the current time falls within a specific time period
    Dim i As Integer
    For i = 1 To 27
        Dim rangeIndex As Integer
        If i Mod 3 = 1 Then ' Determine the time period based on the index of the range
            rangeIndex = (i + 2) \ 3
        Else
            rangeIndex = ((i + 2) \ 3) - 1
        End If
        
        If TimeValue(currentTime) >= TimeValue(timePeriods(rangeIndex)) And TimeValue(currentTime) < TimeValue(timePeriods(rangeIndex + 1)) Then
            ranges(i).Interior.Color = RGB(255, 255, 0) ' Change the background color to Yellow
        End If
    Next i
End Sub