![]() |
Creat a new worksheet
Please help me to write a VBA code to creat a new worksheet named "New"
Thanks |
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 |
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! * |
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! * |
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 |
All times are GMT +1. The time now is 12:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com