‘Cells(“A” & i).VerticalAlignment = xlVAlignCenter I’ve not error proofed it yet but you can get the idea… Add images of the first few rows of each sheet beside the hyperlinks. Mouse_event MOUSEEVENTF_LEFTUP, 0&, 0&, 0&, 0&Ġ65 Table of Contents – variation. Mouse_event MOUSEEVENTF_LEFTDOWN, 0&, 0&, 0&, 0& If SecondsElapsed >= SecondsToActivate Then Worksheets(“Sheet1”).Range(“B4”).Interior.ColorIndex = 3 If SecondsElapsed = SecondsToActivate * 0.7 And SecondsElapsed = SecondsToActivate * 0.8 And SecondsElapsed = SecondsToActivate * 0.9 And SecondsElapsed = SecondsToActivate * 0.95 Then Worksheets(“Sheet1”).Range(“B5”).Value = counter Worksheets(“Sheet1”).Range(“B3”).Value = SecondsElapsed Worksheets(“Sheet1”).Range(“B2”).Value = MinutesElapsed Worksheets(“Sheet1”).Range(“B1”).Value = “X: ” & lngCurPos.x & ” Y: ” & lngCurPos.y SecondsElapsed = Round(Timer – StartTime, 2) SecondsToActivate = Hour(SecondsToActivate) * 3600 + Minute(SecondsToActivate) * 60 + Second(SecondsToActivate) SecondsToActivate = Worksheets(“Sheet1”).Range(“B7”).Value Worksheets(“Sheet1”).Range(“B7”).NumberFormat = “hh:mm:ss” If Worksheets(“Sheet1”).Range(“B7”).Value = “” Then Worksheets(“Sheet1”).Columns(“B”).HorizontalAlignment = xlCenter Worksheets(“Sheet1”).Columns(“B”).ColumnWidth = 15 Worksheets(“Sheet1”).Columns(“A”).ColumnWidth = 21 Worksheets(“Sheet1”).Range(“A1:B7”).Borders.LineStyle = xlContinuous Worksheets(“Sheet1”).Range(“B7”).Interior.ColorIndex = 6 Worksheets(“Sheet1”).Range(“B4”).Interior.ColorIndex = xlNone Worksheets(“Sheet1”).Range(“A7”).Value = “Time to Activate” Worksheets(“Sheet1”).Range(“A6”).Value = “Total Run Time” Worksheets(“Sheet1”).Range(“A5”).Value = “Times Activated” Worksheets(“Sheet1”).Range(“A4”).Value = “Time Remaining” Worksheets(“Sheet1”).Range(“A3”).Value = “Seconds Elapsed” Worksheets(“Sheet1”).Range(“A2”).Value = “Time Elapsed” Worksheets(“Sheet1”).Range(“A1”).Value = “Cursor Position” Public Declare PtrSafe Function GetCursorPos Lib “user32” (lpPoint As POINTAPI) As Long Private Const MOUSEEVENTF_RIGHTUP As Long = &H10ĭeclare PtrSafe Sub Sleep Lib “kernel32” (ByVal dwMilliseconds As Long) Private Const MOUSEEVENTF_RIGHTDOWN As Long = &H8 Private Declare PtrSafe Sub mouse_event Lib “user32” (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) Private Declare PtrSafe Function SetCursorPos Lib “user32” (ByVal x As Long, ByVal y As Long) As Long Hello guys thanks.i wanted to undestnad below codes can someone pls help for declaration part MsgBox "Your Pivot Table is now updated." Pivot_Sheet.PivotTables(PivotName).RefreshTable PivotCaches.Create(SourceType:=xlDatabase, SourceData:=NewRange) 'Change Pivot Table Data Source Range Address NewRange = Data_Sheet.Name & "!" & DataRange.Address(ReferenceStyle:=xlR1C1) Set DataRange = Data_Sheet.Range(StartPoint, Cells(DownCell, LastCol)) LastCol = StartPoint.End(xlToRight).Column Set Pivot_Sheet = ThisWorkbook.Worksheets("Pivot3") Set Data_Sheet = ThisWorkbook.Worksheets("PivotTableData3")