View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
navel151 navel151 is offline
external usenet poster
 
Posts: 16
Default Rename Worksheet From Cell Data

Great! Now, is there a way to run one macro that would work on multiple
worksheets so that they each get renamed to the value in B9 in that sheet?

"Gary''s Student" wrote:

Running the tiny macro will set the tab name to the value in B9:

Sub rNmae()
ActiveSheet.Name = Range("B9").Value
End Sub

Macros are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the macro from Excel:

1. ALT-F8
2. Select the macro
3. Touch RUN

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

--
Gary''s Student - gsnu201001


"navel151" wrote:

Is there a way to rename a worksheet based on a cell in the worksheet?