Rename active sheet

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
 
R

Ron de Bruin

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
 
Top