Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Rename active sheet

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Rename active sheet

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

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ginny" wrote in message om...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Rename active sheet

all you need is
activesheet.name = "sheet1"
exactly as shown

--
Don Guillett
SalesAid Software

"Ginny" wrote in message
om...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i rename a sheet if the rename tab is inactive? Nelson Excel Worksheet Functions 1 March 3rd 10 10:28 AM
macro to: Add new sheet, then rename new sheet with todays date Paul Excel Worksheet Functions 3 September 29th 07 03:17 AM
Move data to new sheet - rename sheet based on criteria ? [email protected] Excel Discussion (Misc queries) 7 May 16th 07 10:22 PM
how do I rename a sheet jonwyn New Users to Excel 2 March 1st 05 08:36 PM
Rename Active Sheet Jason[_25_] Excel Programming 2 September 21st 03 02:03 AM


All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"