Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
lashio
 
Posts: n/a
Default Creat a new worksheet

Please help me to write a VBA code to creat a new worksheet named "New"
Thanks


  #2   Report Post  
William
 
Posts: n/a
Default

Hi lashio

ActiveWorkbook.Sheets.Add.Name = "New"

--

XL2003
Regards

William



"lashio" wrote in message
...
Please help me to write a VBA code to creat a new worksheet named "New"
Thanks



  #3   Report Post  
Hank Scorpio
 
Posts: n/a
Default

On Mon, 25 Apr 2005 02:07:32 GMT, "lashio"
wrote:

Please help me to write a VBA code to creat a new worksheet named "New"
Thanks


Sub CreateNewWks()

Dim wks As Worksheet

Set wks = ActiveWorkbook.Worksheets.Add

'WARNING!
'This will fail if there's already a sheet by that name.
wks.Name = "New"

Set wks = Nothing

End Sub


---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *
  #4   Report Post  
lashio
 
Posts: n/a
Default

Thank you, Hank

"Hank Scorpio" wrote in message
...
On Mon, 25 Apr 2005 02:07:32 GMT, "lashio"
wrote:

Please help me to write a VBA code to creat a new worksheet named "New"
Thanks


Sub CreateNewWks()

Dim wks As Worksheet

Set wks = ActiveWorkbook.Worksheets.Add

'WARNING!
'This will fail if there's already a sheet by that name.
wks.Name = "New"

Set wks = Nothing

End Sub


---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *



  #5   Report Post  
lashio
 
Posts: n/a
Default

Thank you, William

"William" wrote in message
...
Hi lashio

ActiveWorkbook.Sheets.Add.Name = "New"

--

XL2003
Regards

William



"lashio" wrote in message
...
Please help me to write a VBA code to creat a new worksheet named "New"
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
Search/Match between 2 x separate Worksheets and populate result in third worksheet Alan Bartley Excel Discussion (Misc queries) 1 April 11th 05 05:21 AM
Copy from worksheet to another x times Union70 Excel Discussion (Misc queries) 0 March 7th 05 09:03 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
Indirect reference from one worksheet to another Bill Sturdevant Excel Worksheet Functions 2 December 17th 04 01:23 PM
Reference Data in Moved Worksheet tommcbrny Setting up and Configuration of Excel 1 December 1st 04 06:49 PM


All times are GMT +1. The time now is 11:50 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"