F
Faraz A. Qureshi
What code would select sheets that are named in the range: Sheet1!A1:A10
ignoring blanks cells, if any?
Thanx in advance.
ignoring blanks cells, if any?
Thanx in advance.
Gary Keramidas said:give this a try
Sub select_sheets()
Dim ws As Worksheet
Dim cell As Range
Set ws = Worksheets("Sheet1")
For Each cell In ws.Range("A1:A10")
On Error Resume Next
If cell.Value > "" Then
Worksheets(cell.Value).Select False
End If
On Error GoTo 0
Next
End Sub
Faraz A. Qureshi said:Thanx Gary,
However, the code keeps the already active sheet to remain in the selected
one.