ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sheet collection (https://www.excelbanter.com/excel-programming/280772-re-sheet-collection.html)

Tom Ogilvy

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






All times are GMT +1. The time now is 12:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com