Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Rename a Worksheet on Input of Value in Cell

I have the following code with the relevant sheet code. What I'm ytring to
achieve is when a value is entered in C5 then the Worksheet is renamed as
what is entered in C5. Only problem is that it doesn't do anything for me.
What am I doing wrong?

Thanks



Private Sub Worksheet_Change(ByVal Target As Range)
Dim Shouldbe As String
With Target
If .Address = "$C$5" Then
If .HasFormula = False Then
Shouldbe = StrConv(.Value, vbProperCase)
If .Value < Shouldbe Then _
.Value = Shouldbe
End If
End If
End With
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Rename a Worksheet on Input of Value in Cell

Just closed the file and opened it up and now whatever I enter in C5 changes
the name of the sheet as desired. Why did it do that when I closed and
reopened?



"John" wrote in message
...
I have the following code with the relevant sheet code. What I'm ytring to
achieve is when a value is entered in C5 then the Worksheet is renamed as
what is entered in C5. Only problem is that it doesn't do anything for me.
What am I doing wrong?

Thanks



Private Sub Worksheet_Change(ByVal Target As Range)
Dim Shouldbe As String
With Target
If .Address = "$C$5" Then
If .HasFormula = False Then
Shouldbe = StrConv(.Value, vbProperCase)
If .Value < Shouldbe Then _
.Value = Shouldbe
End If
End If
End With
End Sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert date Larry Excel Worksheet Functions 28 July 15th 06 02:41 AM
How do I get ONLY new info from 1 Worksheet to another automatical Elaine Excel Worksheet Functions 6 July 13th 06 05:45 PM
Using cell content to access another worksheet in same workbook ScubaBum Excel Worksheet Functions 5 June 28th 06 11:11 PM
how do i rename worksheet to equal cell name MissSunshineKiss Excel Worksheet Functions 2 June 28th 05 02:05 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


All times are GMT +1. The time now is 01:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"