View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
michaelberrier michaelberrier is offline
external usenet poster
 
Posts: 63
Default Dynamic + Fixed worksheet name

On Tuesday, May 24, 2016 at 5:20:55 PM UTC-4, Claus Busch wrote:
Hi Micheal,

Am Tue, 24 May 2016 12:59:44 -0700 (PDT) schrieb michaelberrier:

I want to name a worksheet with a fixed name, say "Total" and a dynamic cell value which will be a number. So, if the cell reference is A1, and the value of A1 is 37, the worksheet name would be "Total 37". The value in A1 would change, hence the dynamic.


in the code module of the expected sheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) < "A1" Then Exit Sub
ActiveSheet.Name = "Total " & Target.Value
End Sub


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional


Ok, this will be an elementary question, but how do I get the private sub to run? I've tried doing a "Call" module, but it fails.