Naming tabs
I have never done a VBA function. Do I just type this in the VBA module and
then it should work, or do I need to do something more?
"Gord Dibben" wrote:
Or place this code into Thisworkbook module and forget about adding to each
sheet.
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
With ActiveSheet
If Not .Range("A1") Is Nothing Then
.Name = Range("A1").Value
End If
End With
End Sub
Gord Dibben MS Excel MVP
On Mon, 26 Nov 2007 18:02:53 -0400, "Bernard Liengme"
wrote:
Try this sub which must be placed on the sheet's module.
You need one for every sheet you which to rename
best wishes
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Me.Range("A1")) Is Nothing Then
Me.Name = Range("A1").Value
End If
End Sub
|