View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Patrick Simonds Patrick Simonds is offline
external usenet poster
 
Posts: 258
Default Renaming worksheets

This does not seem to work. It runs through all the sheets but does not
rename them. This is what is found in cell AB1:

=TEXT($A$4,"dd mmm yy")

I did not referance cell A4 directly because it contained a formula to
arrive at the date.


"Bob Phillips" wrote in message
...
Typo alert.

Dim WS as Worksheet
for each WS in Worksheets
WS.name = WS.Range("AB1").value
next WS

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ardus Petus" wrote in message
...
Dim WS as Worksheet
for each WS in Worksheets
WS.name = WS.Range("AB1"=.value
next WS


HTH
--
AP

"Patrick Simonds" a écrit dans le message de
...
I thought I had this working but apparently not. I have 100+
worksheets

in
my workbook, I need a macro which when run will rename each worksheet
to

the
worksheets cell AB1 (each worksheet will have its own cell AB1 which

will
contain the text to be used as the worksheets name) and when it is done

it
must return me to the worksheet which was active when called the
macro.