#1
|
|||
|
|||
Automate Excel tabname
Hi I want to automate my tabname (sheet3) based on cell c53.
A member called Bigwheel advised this "Private Sub Worksheet_Activate() Sheets(1).Name = Range("H2").Value End Sub Enter the code above on the required worksheet i.e. double click the sheet in the VB editor which you see listed under Microsoft Excel Objects" Which I tried, but not being an Excel expert got lost.... Could somebody please advise in laymans terms for me. Thanks in advance, Deegz |
#2
|
|||
|
|||
Code:
' Module : Sheet3 Private Sub Worksheet_Change(ByVal Target As Range) If Target = "" Then Exit Sub If Target.Address = "$C$53" Then ActiveSheet.Name = Target End Sub |
#3
|
|||
|
|||
Follow these instructions Deegz.
If Range("C53") = "" Then Exit Sub If ActiveSheet.Name <> Range("C53") Then ActiveSheet.Name = Range("C53") Exit Sub EH: MsgBox "The value is cell C53 has created an error" & vbCr & vbCr & "Description: " & Err.Description |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Opening multiple Excel files within the same Excel window. | lost9471 | Excel | 2 | 05-01-2010 01:57 PM |
How do I use an Excel form to populate and Excel spreadsheet | apostht | Excel | 0 | 05-21-2006 11:17 AM |