Rename active sheet

  • Thread starter Thread starter Ginny
  • Start date Start date
G

Ginny

I was using a macro in exel 2002, and now have exel 2003.
The coding for changing the name of the active sheet (Which was:
Active sheet.Select ; ActiveSheet.Name = "sheet1") does not work
with my new exel. Has something changed?
Thanks
 
Active sheet.Select
You must use ActiveSheet instead of Active Sheet

But if you want to rename the Active sheet then this line is enough
ActiveSheet.Name = "sheet1"

You can use this to avoid a error if the sheet name already exist

On Error Resume Next
ActiveSheet.Name = "sheet1"
On Error GoTo 0
 
all you need is
activesheet.name = "sheet1"
exactly as shown
 

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