Thread: What is wrong?
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Per Jessen[_2_] Per Jessen[_2_] is offline
external usenet poster
 
Posts: 703
Default What is wrong?

Bob,

I'm glad that you found your way through the forrest :-)

Regards,
Per

On 6 Feb., 02:54, robert morris
wrote:
Per,

You and Max were both correct! *I did not have the code in ThisWorkbook.. *
Sometimes "the trees and the forest" comes to play.

Many Thanks

Bob



"Per Jessen" wrote:
Hi Bob


My guess is that you haven't put the *macro into the right place.


As it is a workbook event code it has to be in the code sheet for
ThisWorkbook.


Hopes this helps.


---
Per


"robert morris" skrev i meddelelsen
...


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


Any ideas?


Bob M.- Skjul tekst i anførselstegn -


- Vis tekst i anførselstegn -