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

Hello all!

I was trying to ADD & INSERT a worksheet to the existing worksheets
in a workbook and then rename the most currently added (ACTIV
WORKSHEET) to "FEV". How could I generalize the VB code for an
sheetname? Sometimes "sheet2" gets added/inserted to the existin
sheets and sometimes "sheet3" gets added unless we close th
workbook.....

Any suggestions would be greatly appreciated guys and that would b
help.

Thanks,
Arun.
Engr, Vextec

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 634
Default Renaming worksheets!

Set NewSh = Worksheets.Add
NewSh.Name = "FEV"

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"aiyer " wrote in message
...
Hello all!

I was trying to ADD & INSERT a worksheet to the existing worksheets,
in a workbook and then rename the most currently added (ACTIVE
WORKSHEET) to "FEV". How could I generalize the VB code for any
sheetname? Sometimes "sheet2" gets added/inserted to the existing
sheets and sometimes "sheet3" gets added unless we close the
workbook.....

Any suggestions would be greatly appreciated guys and that would be
help.

Thanks,
Arun.
Engr, Vextec.


---
Message posted from http://www.ExcelForum.com/



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.592 / Virus Database: 375 - Release Date: 18/02/2004


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Renaming worksheets!

One way:

Worksheets.Add(After:=ActiveSheet).Name = "FEV"



In article ,
aiyer wrote:

Hello all!

I was trying to ADD & INSERT a worksheet to the existing worksheets,
in a workbook and then rename the most currently added (ACTIVE
WORKSHEET) to "FEV". How could I generalize the VB code for any
sheetname? Sometimes "sheet2" gets added/inserted to the existing
sheets and sometimes "sheet3" gets added unless we close the
workbook.....

Any suggestions would be greatly appreciated guys and that would be
help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Renaming worksheets!

Dim wShtNew As Worksheet
Set wShtNew = Sheets.Add(After:=Sheets(Sheets.Count))
wShtNew.Name = "YourSheetName"

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

Hello all!

I was trying to ADD & INSERT a worksheet to the existing worksheets,
in a workbook and then rename the most currently added (ACTIVE
WORKSHEET) to "FEV". How could I generalize the VB code for any
sheetname? Sometimes "sheet2" gets added/inserted to the existing
sheets and sometimes "sheet3" gets added unless we close the
workbook.....

Any suggestions would be greatly appreciated guys and that would be
help.

Thanks,
Arun.
Engr, Vextec.


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
Renaming worksheets Teeny Excel Discussion (Misc queries) 8 August 18th 09 10:21 PM
Renaming worksheets James Excel Worksheet Functions 0 May 12th 09 11:45 PM
RENAMING WORKSHEETS LEOPARDSHIDEAWAY Excel Worksheet Functions 1 July 26th 07 10:27 PM
Renaming worksheets Mike Allen Excel Discussion (Misc queries) 8 January 21st 07 02:15 AM
Renaming Worksheets Steve Walford Excel Worksheet Functions 3 April 1st 05 09:29 PM


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

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

About Us

"It's about Microsoft Excel"