I've made a spreadsheet for a Q&A section I'm working on and have macros set to go to question 1 when the button question 1 is clicked. The macro for question one is searching for a key work, in this case, Q1 - The code I'll paste below is working as long as no additional cells are inserted.
Here is the code I'm using:
Sub Question01()
Dim myRange As Range
Dim myCell As Range
Set myRange = Range("A30:A10000")
For Each myCell In myRange
If myCell Like "Q1" Or _
myCell Like "Q1" Then
Range("A75").Select
ActiveWindow.ScrollRow = ActiveCell.Row
End If
Next myCell
End Sub
I think the issue is with the range("A75").Select as if everything is left alone it works, but when a blank row is added above A75 the key work Q1 is no longer at the top of the spreadsheet, but is one down from where it is supposed to be.
Thanks in advance for any assistance!
Danny