View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default Naming a worksheet tab from a reference cell

Improved code:
Rather than use a formula in worksheet, can do it directly via code with this:

Private Sub Worksheet_Activate()
ActiveSheet.Name = WorksheetFunction.Text(Range("A1").Value, "mmmm")
End Sub
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Finance Guru" wrote:

Hi All,

Using Excel 2007

Can I name a worksheet tab from a cell contained within the worksheet. I
want to name a worksheet from the date contained in say A1 =
30/06/2009(dd/mm/yyyy)
so the tab would be called 'June' from the moonth number in A1.

If so could someone give me either the function or the code to do this. If
it is code could also detail how to apply it,as I am not that familiar with
code.

Many thanks for taking the time out to respond.

FinanceGuru


--
Wales - the land of fire breathing dragons and rugby playing wizards.