ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Rename Sheet from a cell value (https://www.excelbanter.com/new-users-excel/449548-rename-sheet-cell-value.html)

Garry[_2_]

Rename Sheet from a cell value
 
1) Is it possible via a macro To take the value of say Cell (A1) and rename the current sheet you have focus on.


Thanks

garry



Claus Busch

Rename Sheet from a cell value
 
Hi,

Am Tue, 26 Nov 2013 09:30:11 -0800 (PST) schrieb Garry:

1) Is it possible via a macro To take the value of say Cell (A1) and rename the current sheet you have focus on.


try:
ActiveSheet.Name = Range("A1")


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

Garry[_2_]

Rename Sheet from a cell value
 
On Tuesday, 26 November 2013 17:41:42 UTC, Claus Busch wrote:
Hi,



Am Tue, 26 Nov 2013 09:30:11 -0800 (PST) schrieb Garry:



1) Is it possible via a macro To take the value of say Cell (A1) and rename the current sheet you have focus on.




try:

ActiveSheet.Name = Range("A1")





Regards

Claus B.

--

Win XP PRof SP2 / Vista Ultimate SP2

Office 2003 SP2 /2007 Ultimate SP2


Im sorry, Could you please tell me where this goes in the sheet. Sorry Im a bit thick.
Garry

Claus Busch

Rename Sheet from a cell value
 
Hi,

Am Tue, 26 Nov 2013 10:51:12 -0800 (PST) schrieb Garry:

Im sorry, Could you please tell me where this goes in the sheet.

Press Alt+F11, insert a standard module and paste the code into the code
window:

Sub Test()
ActiveSheet.Name = Range("A1")
End Sub

Back on your sheet you can run the nacro "Test" to name the sheet.


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


All times are GMT +1. The time now is 09:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com