View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Sheet Name change

try

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Address < Cells(3, 5).Address Then Exit Sub
On Error Resume Next
ActiveSheet.Name = Target
End Sub


--
Don Guillett
SalesAid Software

"Barry Wright" wrote in message
...
Got stumped ont hsi one :-( Trying to rename a sheet to what ever
value is in a certain cell. This returns an error, and the help files
did not help much,,,,

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
Dim cRow As Long, cCol As Long
cRow = Target.Row
cCol = Target.Column
If (cCol = 14 And cRow = 5) Then ActiveSheet.Name = Target.Value

End Sub