how to rename the sheet in programming

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi there

i just want to program that excel can automatic rename the sheet's name once I key-in in the specific cell.
For example
a1 = testin
result : the active sheet will be named as "testing"
 
The code, simply, is

ActiveSheet.Name = Range("A1").Text

You probably want to use an event procedure to make this happen
automatically. For example, put the following code in the code module for
the worksheet in question:

Private Sub Worksheet_Change(ByVal Target As Range)
Me.Name = Me.Range("A1").Text
End Sub



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

chng said:
hi there;

i just want to program that excel can automatic rename the sheet's name
once I key-in in the specific cell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top