1)One easy way:
X=""
once you have used the variable named X
2)
Sub TryThis()
Dim Sht As Worksheet
Dim X As String 'the name of the sheet
'Worksheets("Budget").Activate
X = Range("S4")
'Lcase avoids upper lower... case problems
For Each Sht In ThisWorkbook.Worksheets
If LCase(Sht.Name) = LCase(X) Then
Sht.Activate
Exit For
End If
Next Sht
End Su
--
Message posted from
http://www.ExcelForum.com