Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I am currently creating new sheet using the following code: Private Sub cmdNewSheet_Click() Sheets.Add Befo=Sheets("Finish"), Type:="C:\Documents and Settings\Administrator\My Documents\Stock Control\StockTemplate1.xlt" Sheets(Sheets.Count - 1).Name = txtNewSheet.Text txtNewSheet.Text = "" End Sub What i would like to do is manipulate the code to create the sheet, but instead of using the file 'Template1.xlt', i would like it to create them from a worksheet called Temp. Does anyone have any ideas? Is it even possible? Thank you in anticipation. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just copy the sheet.
worksheets("Temp").copy _ befo=worksheets(1) And move it/rename it to what you want. That Temp worksheet is in the same workbook, right? David Coyle wrote: Hi, I am currently creating new sheet using the following code: Private Sub cmdNewSheet_Click() Sheets.Add Befo=Sheets("Finish"), Type:="C:\Documents and Settings\Administrator\My Documents\Stock Control\StockTemplate1.xlt" Sheets(Sheets.Count - 1).Name = txtNewSheet.Text txtNewSheet.Text = "" End Sub What i would like to do is manipulate the code to create the sheet, but instead of using the file 'Template1.xlt', i would like it to create them from a worksheet called Temp. Does anyone have any ideas? Is it even possible? Thank you in anticipation. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to create Login & Log out Spread sheet in Excel with automated Attendance sheet | Excel Worksheet Functions | |||
Making a macro on a template update with new each new sheet create | Excel Discussion (Misc queries) | |||
How to merge data in Excel - one sheet to template sheet? | Excel Worksheet Functions | |||
Create, name, open, and enter data in new sheet - from template | Excel Discussion (Misc queries) | |||
Create a new sheet in a workbook from a template | Excel Programming |