FryGirl
Well-known Member
- Joined
- Nov 11, 2008
- Messages
- 1,360
- Office Version
- 365
- 2016
- Platform
- Windows
I have an Excel file with paragraph after paragraph running down a column. These paragraphs will be read and I'd like a macro to scroll one row at a time based on the reading time of each row plus second as a buffer. Column I holds the time value for that paragraph on the same row. With the macro below, it works if I hard code the timevalue to wait before scrolling down, but instead of hard coding the timevalue, I want the timevalue to come from Column I.
With this I get a type mismatch error 13
With this I get a type mismatch error 13
VBA Code:
Sub CreateScrollDown2()
Dim LastRow As Long, CurrRow As Long, r As Range, myTime As String
LastRow = Sheet1.Range("ScriptureEnd")
CurrRow = Sheet1.Range("ScriptureStart")
With ActiveWindow
Do
myTime = TimeValue(Range("I" & CurrRow).Text)
Application.Wait (Now + myTime)
.SmallScroll down:=1
CurrRow = CurrRow + 1
Loop While CurrRow < LastRow
End With
End Sub