Office & Productivity Software forum

General discussion

Using Macro's to rename Excel worksheets?

by Mr. X / February 17, 2005 10:12 PM PST

I need a macro that will rename a worksheet to the text that is written in a cell on my spreadsheet, help anyone?

Discussion is locked
You are posting a reply to: Using Macro's to rename Excel worksheets?
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Using Macro's to rename Excel worksheets?
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Use macro recording ...
by Kees Bakker / February 17, 2005 11:18 PM PST

to get the basic code to rename a worksheet.

Then finish it with some code like
and replace the new name of the worksheet in the code by Selection.Value
This assumes that the new name is in cell C2 of worksheet A.

Hope this helps.


Collapse -
Didn't work
by Mr. X / February 18, 2005 3:59 AM PST

It didnt work it gives an error message saying object doesnt support this property or method

Collapse -
Re: didn't work.
by Kees Bakker / February 18, 2005 7:10 AM PST
In reply to: Didn't work

Mr X,

Please post the whole code of the macro that you assembled, and also tell precisely what statement gives the error message (and the full text of the error message, and the version of Excel). It seems you produce illegal code.
I suppose swisse (one of our valued members) will be able to correct the error you obviously made.

Hope this helps.


Collapse -
Fixed it
by Mr. X / February 18, 2005 8:11 AM PST
In reply to: Re: didn't work.

Looks like my last message didnt post (or i posted it in the wrong thread) but ive got the code working now, thanks

Popular Forums
Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?