View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
external usenet poster
 
Posts: 644
Default Need help with using VBA to select tabs in Excel

Sub LoopSheetsFromRange()
Dim NameRange as Range
Dim ShName as Range
Sheets("Sheet1").Select 'Assumes Sheet1 Holds Sheet Names
Set NameRange = Range("A1:A10") 'Assumes A1:A10 are all valid Sheet
Names
For each ShName in NameRange
Sheets(ShName.Value).Select
Next
End Sub

HTH

Die_Another_Day
MFINE wrote:
I am trying to create a loop in VBA which will insert into a sheets().select
statement the name of the tab I am interested in. The tab names would be
contained in a tab in the same workbook. Any suggestions?

Thanks