ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Rename Active Sheet (https://www.excelbanter.com/excel-programming/277628-rename-active-sheet.html)

Jason[_25_]

Rename Active Sheet
 
I am using an input box to store a string which is
entered by the user as follows:

strCrossGroup = InputBox("Pool/Owner:")

I would then like the value which is entered by the user
to become the name of the ACTIVE worksheet (i.e. If I
enter "Jones" in the input box, I want the active sheet
to be renamed to "Jones"). My initial idea is something
as follows, although I am not sure how to finish it.
Thanks for your help.

Sheets(?).Select.Name = strCrossGroup

Vasant Nanavati[_2_]

Rename Active Sheet
 
Hi Jason:

ActiveSheet.Name = strCrossGroup

Regards,

Vasant.


"Jason" wrote in message
...
I am using an input box to store a string which is
entered by the user as follows:

strCrossGroup = InputBox("Pool/Owner:")

I would then like the value which is entered by the user
to become the name of the ACTIVE worksheet (i.e. If I
enter "Jones" in the input box, I want the active sheet
to be renamed to "Jones"). My initial idea is something
as follows, although I am not sure how to finish it.
Thanks for your help.

Sheets(?).Select.Name = strCrossGroup




Robbie[_3_]

Rename Active Sheet
 

Did you try

ActiveSheet.Name = strCrossGroup

?

Robbie

-----Original Message-----
I am using an input box to store a string which is
entered by the user as follows:

strCrossGroup = InputBox("Pool/Owner:")

I would then like the value which is entered by the user
to become the name of the ACTIVE worksheet (i.e. If I
enter "Jones" in the input box, I want the active sheet
to be renamed to "Jones"). My initial idea is something
as follows, although I am not sure how to finish it.
Thanks for your help.

Sheets(?).Select.Name = strCrossGroup
.



All times are GMT +1. The time now is 10:51 PM.

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