View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Activating Sheet from a List

Dim rng as Range, cell as Range
Dim sh as Worksheet
with worksheets("sheet1")
set rng = .Range("A1:A10")
End With
for each cell in rng
set sh = worksheets(cell.value)
sh.Activate
msgbox "Look at sheet " & sh.Name
Next

--
Regards,
Tom Ogilvy

"Magnivy" wrote:

Hey There,

I have a workbook with numerous worksheets. One of the worksheets, say
Sheet1, lists the names of the other worksheets, say Sheet2 through Sheet
10,in cells A2 through A10. Each cell contains the name of only one worksheet.

I am trying to create a macro that would read the name of Sheets2 from cell
A2, select it, perform an operation on it (which I already have), select
Sheet3 from Cell A3, perform an operation on it, and so on till the operation
is performed on Sheet10.

I havent been able to come up with a macro that would work. Any help you
provide would be greatly appreciated!

Sincerely,

Magnivy!