I want to select multiple sheets at once by refering from range A1 to A6. Below code works just fine if all cell(A1:A6) contain a valid sheet name. However, this code will crash if there is empty or blank cell in between A1:A6. Is there any way to ignore those empty cell in vba?
VBA Code:
Sub Select_Macro1()
Dim ary As Variant
ary = Application.Transpose(Range("A1:A6").Value)
Worksheets(ary).Select
End Sub