Thread: What is wrong?
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
robert morris robert morris is offline
external usenet poster
 
Posts: 222
Default What is wrong?


Duh??

I feel "blonde".

Thanks Max

Bob M.



"Max" wrote:

Works fine in testing here,
provided B2 contains a valid sheetname (w/o prohibited chars)

In VBE, did you install it in "ThisWorkbook"?
It's meant to be placed there.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"robert morris" wrote:
I use this VBA Code to change the Tab name at the same time as I enter a
name in Cell B2. Why doesn't it work? I use the same code in another
Workbook and it works.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Address = "$B$2" Then Sh.Name = Target.Value
End Sub