View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
Big Rick
 
Posts: n/a
Default Tab Names Changes

Thanks Roger.
Once again, I have not been let down. I thought this might proved a little
tricky, but you simply took it all in your stride.
I off work after today, so I am sure I will be in touch after a week or three.

Thanks again.
--
Big Rick


"Roger Govier" wrote:

Hi Rick

Sorry, I hadn't appreciated it was 2 separate sheets.
The following seems to work OK for me

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1"
Dim ws1 As Worksheet
Set ws1 = ActiveWorkbook.Worksheets("Sheet2")

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With ws1
.Name = Format(Target.Value + 7, "dd mm")
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub