Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Changing Worksheet Names via VBA

Hey all,

Is there a way to change the name of the worksheet via VBA code? I
could do it using a recorded macro, but the extra step I need is to
automate the name change. In cell A6 I have a name which I'd like to
use as the name for the sheet. So, when a macro runs, in addition to
all the tasks it's supposed to perform, it will rename the sheet with
whatever value is in cell A6.

Thanks for yourhelp in advance!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Changing Worksheet Names via VBA

With Activesheet
.Name = .Range("A6").Value
End With

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message
ups.com...
Hey all,

Is there a way to change the name of the worksheet via VBA code? I
could do it using a recorded macro, but the extra step I need is to
automate the name change. In cell A6 I have a name which I'd like to
use as the name for the sheet. So, when a macro runs, in addition to
all the tasks it's supposed to perform, it will rename the sheet with
whatever value is in cell A6.

Thanks for yourhelp in advance!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Changing Worksheet Names via VBA

On May 15, 5:56 pm, "Bob Phillips" wrote:
With Activesheet
.Name = .Range("A6").Value
End With

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

wrote in message

ups.com...



Hey all,


Is there a way to change the name of the worksheet via VBA code? I
could do it using a recorded macro, but the extra step I need is to
automate the name change. In cell A6 I have a name which I'd like to
use as the name for the sheet. So, when a macro runs, in addition to
all the tasks it's supposed to perform, it will rename the sheet with
whatever value is in cell A6.


Thanks for yourhelp in advance!- Hide quoted text -


- Show quoted text -


Thanks - that worked! Truly appreciate the help!

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
can worksheet names be changed by changing certain cells? anand Excel Worksheet Functions 4 October 5th 07 02:27 PM
Managing links to Summary from constantly changing worksheet names klysell Excel Programming 6 February 27th 07 12:57 AM
Changing worksheet names Carolyn Excel Worksheet Functions 1 November 10th 06 05:21 AM
Changing VB Component Names to match Worksheet names using VBE Philip Excel Programming 1 April 12th 05 05:37 PM
return all worksheet tab names and chart sheet tab names in report - an example DataFreakFromUtah Excel Programming 2 October 6th 04 08:09 PM


All times are GMT +1. The time now is 09:41 AM.

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"