View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Finance Guru Finance Guru is offline
external usenet poster
 
Posts: 83
Default Tab naming from a Reference cell

Hi Jacob - The second option is what I wanted.

Did as you said but when I typed in 30/06/2009 in A1 nothing happened to the
tab name. The format of A1 is date. I am not sure whether this has anything
to do with it or not.

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


"Jacob Skaria" wrote:

If you want this to change everytime you change cell A1; then try the below
code; which can be pasted to the SheetTabView Code window...

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Range("A1")) Is Nothing Then
Application.EnableEvents = False
Me.Name = Format(Range("A1"), "mmmm")
Application.EnableEvents = True
End If
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Finance Guru" wrote:

Hi Jacob - That didn't work. Any other ideas.
I put the code into the tab - right clicked the tabview codepaste .. and
entered 30/06/09 in A1 .. and the Tab name never changed

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


"Jacob Skaria" wrote:

Try the below macro which renames the activesheet to the month of date in A1

Sub Macro1()
Activesheet.name = Format(Range("A1"),"mmmm")
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"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 month 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.








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