ActiveWindow.ScrollColumn = 5
Public Declare Function GetTickCount Lib "Kernel32" () As Long
lngTime = GetTickCount()
Option Explicit
Private Declare Function GetTickCount Lib "kernel32" () As Long
Sub ScrollByTick()
Dim lngTicks As Long
Dim lngIndex As Long
Dim varrTicks As Variant
Dim varrCols As Variant
varrTicks = Array(1, 3540000, 5000000, 10000000)
varrCols = Array(1, 2, 3, 4)
Do Until lngTicks > varrTicks(UBound(varrTicks))
lngTicks = lngTicks + 1
For lngIndex = 0 To UBound(varrTicks)
If lngTicks = varrTicks(lngIndex) Then
ActiveWindow.ScrollColumn = varrCols(lngIndex)
Exit For
End If
Next
Loop
End Sub
lngTicks = lngTicks + 1
would go at a speed that cannot be controlled.I see that you're not using the GetTickCount API functionYou're right! I meant to. Be back in a bit.
Once you reach it you could do something like:
Open in new window
That will scroll 1 column to the right. So if you have columns A - O showing it will scroll right and show B - P.Without knowing what the rest of your code is there isn't much else I can help with.