Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 430
Default How do I make a worksheet name equal to a cell

I have an existing workbook with several worksheets. I need to make the
worksheet name equal to a cell in the worksheet
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default How do I make a worksheet name equal to a cell

Sheets(3).Name = Sheets(3).Cells(1,1).Value

This will set the name of the third sheet to whatever is in cell of
that sheet. Adjust as needed.

tim m wrote:
I have an existing workbook with several worksheets. I need to make the
worksheet name equal to a cell in the worksheet


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default How do I make a worksheet name equal to a cell


'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
As Range)
If Target.Address = "$A$1" Then '<=== change to suit
Sh.Name = Target.Value
End If
End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"tim m" wrote in message
...
I have an existing workbook with several worksheets. I need to make the
worksheet name equal to a cell in the worksheet



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
can I make cell "yes" equal 1, "no" equal 0 can I make cell yes equal 1, no equa Excel Discussion (Misc queries) 4 April 22nd 23 06:09 AM
Make Cell Equal to File Name (not worksheet) jvanderh Excel Worksheet Functions 1 December 16th 10 07:57 PM
How do I make a worksheet name equal to a cell tim m Excel Programming 0 October 23rd 06 05:44 PM
make a cell equal a worksheet name cyndi Excel Discussion (Misc queries) 3 June 22nd 06 09:31 PM
can I make worksheet name equal a cell flyingdoc Excel Worksheet Functions 3 July 22nd 05 03:19 PM


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