PC Review


Reply
Thread Tools Rate Thread

Creating a new worksheet and naming it according to a specific cel

 
 
Surfbreakn2000
Guest
Posts: n/a
 
      19th Jun 2008
Hey I'm trying to create a scipt that will creat a new worksheet and name
that new worksheet according to a cell in a particular other worksheet. Or I
would like it to name it according to what the selected cell is before the
macro runs. How can I do this?
 
Reply With Quote
 
 
 
 
GTVT06
Guest
Posts: n/a
 
      19th Jun 2008
On Jun 18, 9:05*pm, Surfbreakn2000
<Surfbreakn2...@discussions.microsoft.com> wrote:
> Hey I'm trying to create a scipt that will creat a new worksheet and name
> that new worksheet according to a cell in a particular other worksheet. Or I
> would like it to name it according to what the selected cell is before the
> macro runs. How can I do this?


hello,

This code will create a new sheet and name it based off the cell A1
value in "Sheet1"
Worksheets.Add(After:=Sheets(Sheets.Count)).Name =
Worksheets("Sheet1").Range("A1").Value

This code will create a new sheet and name it based off the value in
the active cell
Worksheets.Add(After:=Sheets(Sheets.Count)).Name = ActiveCell.Value
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export from access to specific worksheet and specific cell in exce Kevin Microsoft Access VBA Modules 4 26th Jan 2009 08:11 AM
Re: Creating/Naming New Worksheets Based on Select Cells in Master Worksheet Ron de Bruin Microsoft Excel Worksheet Functions 0 19th Mar 2008 03:32 PM
Creating & Naming a New Worksheet =?Utf-8?B?dGVyZXNh?= Microsoft Excel Programming 1 13th Dec 2004 02:18 PM
naming columns (not row specific) dwojtowi Microsoft Excel Misc 1 8th Mar 2004 04:44 PM
naming a worksheet sie Microsoft Excel Worksheet Functions 4 19th Feb 2004 11:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:28 AM.