LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Update Worksheet Name Base on Cell Input Automatically?

If you're using a formula in P2, you should use the worksheet_Calculate event.

Option Explicit
Private Sub Worksheet_Calculate()
On Error Resume Next
Me.Name = Me.Range("P2").Value
If Err.Number < 0 Then
Beep
Err.Clear
End If
On Error GoTo 0
End Sub

Native wrote:

Hello,

I have the following code in a worksheet:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(external:=True) _
= Range("p2").Address(external:=True) Then
On Error Resume Next
Me.Name = Target.Value
On Error GoTo 0
End If
End Sub

My question is, how do I get the worksheet name to update
automatically? For example, the cell P2 has a lookup based on an input
in cell B3. When I change B3, P2 looks up the text and changes from
blue to say green. However, when I change B3, the worksheet name does
not automatically update.

The only way I can get the worksheet name to update is to open the
cell P2 and hit enter.

Any suggestions?

Thanks


--

Dave Peterson
 
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
copy worksheet multiple times base on user's input [email protected] Excel Worksheet Functions 2 June 15th 07 05:51 PM
How do I automatically update my accountability worksheet from my mls Excel Worksheet Functions 1 February 7th 07 07:49 PM
Why don't fields update automatically when new numbers are input?. Frustrated in NJ Excel Discussion (Misc queries) 2 February 25th 05 03:07 PM
Automatically Populating Worksheet from Collected Input for Pricelist David Littrell via OfficeKB.com Excel Worksheet Functions 1 January 6th 05 05:04 PM
Automatically Populating Worksheet from Collected Input for Pricelist David Littrell via OfficeKB.com Excel Worksheet Functions 0 January 6th 05 04:29 PM


All times are GMT +1. The time now is 03:46 PM.

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

About Us

"It's about Microsoft Excel"