Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Creat a new worksheet
Please help me to write a VBA code to creat a new worksheet named "New"
Thanks |
#2
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Search/Match between 2 x separate Worksheets and populate result in third worksheet | Excel Discussion (Misc queries) | |||
Copy from worksheet to another x times | Excel Discussion (Misc queries) | |||
Weekly Transaction Processing | Excel Worksheet Functions | |||
Indirect reference from one worksheet to another | Excel Worksheet Functions | |||
Reference Data in Moved Worksheet | Setting up and Configuration of Excel |