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

That should be

Dim ws as Worksheet
For each ws in activeworkbook.worksheets
ws.name= ws.range("a1").value
next ws

--
Regards,
Tom Ogilvy

"nathan" wrote in message
...

-----Original Message-----
Hi

I need to create a macro that renames each worksheet to

the contents in cell
A1 of each worksheet.

Any suggestions will be welcome.

Thanks

Try this, i havent tested it myself.
.
For each ws in activeworkbook

ws.name= ws.range("a1")
next ws