Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default sheet tab value/nav menu

Folks...

Bit of ambitious challenge here!

I have 15 sheets. In cell A1 of each sheet the user will enter a name eg
John. I want the sheet tab for sheet 1 to change to say John. Sheet 2 tab say
Phil etc...

Also, in cell A2 I'm trying build a drop down navigation menu that uses the
names of the sheet tabs?

I'm struggling at the moment! Any help appreciated...

Gordon...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default sheet tab value/nav menu

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1").Value < "" Then ActiveSheet.Name = Range("A1").Value
End Sub

Will do the Sheet Tab Names 4 u !

"Gordon" wrote in message
...
Folks...

Bit of ambitious challenge here!

I have 15 sheets. In cell A1 of each sheet the user will enter a name eg
John. I want the sheet tab for sheet 1 to change to say John. Sheet 2 tab
say
Phil etc...

Also, in cell A2 I'm trying build a drop down navigation menu that uses
the
names of the sheet tabs?

I'm struggling at the moment! Any help appreciated...

Gordon...



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default sheet tab value/nav menu

Hi Corey...

Just checking: Does this code go into the sheet code, wokbook code or a
module. Also, does this work in 2007 when sheet tabs aren't visible? Will
this also work if the value in cell A1 is determined by a validation drop
down menu?

It didn't work for me...yet!

Cheers

Gordon.

"corey" wrote:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1").Value < "" Then ActiveSheet.Name = Range("A1").Value
End Sub

Will do the Sheet Tab Names 4 u !

"Gordon" wrote in message
...
Folks...

Bit of ambitious challenge here!

I have 15 sheets. In cell A1 of each sheet the user will enter a name eg
John. I want the sheet tab for sheet 1 to change to say John. Sheet 2 tab
say
Phil etc...

Also, in cell A2 I'm trying build a drop down navigation menu that uses
the
names of the sheet tabs?

I'm struggling at the moment! Any help appreciated...

Gordon...




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default sheet tab value/nav menu

This goes under the ThisWorkbook module:

Option Explicit
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Cells.Count 1 Then
Exit Sub 'one cell at a time
End If

If Intersect(Sh.Range("A1"), Target) Is Nothing Then
Exit Sub
End If

On Error Resume Next
Sh.Name = Target.Value
If Err.Number < 0 Then
MsgBox "Rename failed!"
Err.Clear
End If
On Error GoTo 0
End Sub


And for navigating the sheets:
http://contextures.com/xlToolbar01.html
or
http://contextures.com/xlToolbar01b.html

From Debra Dalgleish's site.

Gordon wrote:

Folks...

Bit of ambitious challenge here!

I have 15 sheets. In cell A1 of each sheet the user will enter a name eg
John. I want the sheet tab for sheet 1 to change to say John. Sheet 2 tab say
Phil etc...

Also, in cell A2 I'm trying build a drop down navigation menu that uses the
names of the sheet tabs?

I'm struggling at the moment! Any help appreciated...

Gordon...


--

Dave Peterson
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
Custom Context menu (Right click menu) not working in sheet changeevent. Madiya Excel Programming 3 February 11th 08 01:24 PM
Menu sheet <- chart Zurn[_55_] Excel Programming 1 May 2nd 06 07:12 PM
Menu of sheet names DesM Excel Programming 12 November 2nd 05 11:44 AM
WHy does it only work on Menu SHeet Nigel Bennett Excel Programming 2 March 16th 05 04:07 AM
Is there a way to ReName a Sheet Using a Drop Down Menu? steve Excel Programming 0 August 22nd 03 06:23 PM


All times are GMT +1. The time now is 09:57 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"