View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default sheet collection

Sub AddNames()
dim sh as Worksheet
for each sh in ActiveWorkbook.worksheets
sh.Cells(1,1).Value = sh.name
Next
End Sub

--
Regards,
Tom Ogilvy


"john" wrote in message
...
I am sure this is quite easy. I just can't find an
example.

I need a macro to:

For each sheet in a workbook need to
set sheet.cells(1,1) to sheet.name

I need to do this for about 50 .xls files (All office 2000
format). So I will need to have the macro in my
global.xls file

Thanks for any help, John