W
Wes_A
MS Excel 2007 on XP Pro
I cannot get this code to work but cannot see anything wrong with it can
anyone assist?
It runs but ends up on cell B6 presumably not having found the searched for
text.
Any suggestions will be appreciated.
Sub BACK()
'
' BACK Macro
'
'
Sheets("School1").Select
Range("B5:QJ5").Select
Dim varRange As Range
Dim varFound As Variant, varSearch As Variant
varSearch = Range("A3")
Set varRange = ActiveSheet.Range("B5:QJ5")
Set varFound = varRange.Find(varSearch, lookat:=xlWhole)
If Not varFound Is Nothing Then varFound.Activate
ActiveCell.Offset(1, 0).Activate
End Sub
I cannot get this code to work but cannot see anything wrong with it can
anyone assist?
It runs but ends up on cell B6 presumably not having found the searched for
text.
Any suggestions will be appreciated.
Sub BACK()
'
' BACK Macro
'
'
Sheets("School1").Select
Range("B5:QJ5").Select
Dim varRange As Range
Dim varFound As Variant, varSearch As Variant
varSearch = Range("A3")
Set varRange = ActiveSheet.Range("B5:QJ5")
Set varFound = varRange.Find(varSearch, lookat:=xlWhole)
If Not varFound Is Nothing Then varFound.Activate
ActiveCell.Offset(1, 0).Activate
End Sub