Worksheet Names

lorenambrose

Active Member
Joined
Sep 17, 2008
Messages
265
I have searched this forum for an hour and nothing I find does exactly what I need.

I have a Worksheet and I would like the Sheet Name (Tab) to equal whatever is in another Worksheet called "Introduction", Cell C10.

Nothing I do works. If you can help, I would appreciate it.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
This requires VBA. This is the line of code:
VBA Code:
ActiveSheet.Name = Worksheets("Introduction").Range(C10)

If you do not have any VBA yet you will need to make this part of a sub:
VBA Code:
Public Sub RenameActiveSheet()
   ActiveSheet.Name = Worksheets("Introduction").Range(C10)
End Sub
 
Upvote 0
A line of VBA
VBA Code:
    ActiveSheet.Name = Sheets("Introduction").Range("C10")
 
Upvote 0
VBA Code:
Sheets("Sheet13").Name = Sheets("Introduction").Range("C10")
 
Upvote 0
Rich (BB code):
Public Sub RenameActiveSheet()
   ActiveSheet.Name = Worksheets("Introduction").Range("C10")
End Sub
**** forgot the quotes.
 
Upvote 0
I forgot to state that the sheet I want to name is Sheet13
Then just
VBA Code:
   Sheet13.Name = Worksheets("Introduction").Range("C10")
if that's the codename for the sheet. If it's the tab name but not the codename then
VBA Code:
   Worksheets("Sheet13").Name = Worksheets("Introduction").Range("C10")
 
Upvote 0
Nothing is working and I am sure it's me.

C10 is on worksheet "Introduction" When I change the value in C10, I would like Sheet13 to be renamed.

Some of this code looks like it would work BUT I am not exactly sure where to put it. Would it go on the Sheet13 code or in the worksheets("Introduction") code?

I do not want to have to activate the target sheet to get anything to change.

VBA Code:
Public Sub RenameActiveSheet()
   ActiveSheet.Name = Worksheets("Introduction").Range("C10")
End Sub
 
Upvote 0
I got It!!!!!!

I had it in the target sheets instead of in the source sheet.

Code:
Sub Worksheet_Change(ByVal Target As Range)
   
Sheet13.Name = Worksheets("Introduction").Range("C10")
Sheet14.Name = Worksheets("Introduction").Range("C11")
Sheet25.Name = Worksheets("Introduction").Range("C12")
Sheet16.Name = Worksheets("Introduction").Range("C13")
Sheet17.Name = Worksheets("Introduction").Range("C14")
Sheet19.Name = Worksheets("Introduction").Range("C15")
Sheet18.Name = Worksheets("Introduction").Range("C16")
   
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,182
Messages
6,129,369
Members
449,506
Latest member
nomvula

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top