Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have a spreadsheet with several worksheets, I would like to copy only the (RIC) worksheet to new spreadsheet. I would like the new spreadsheet to use same folder location as the old spreadhsheet and the name with the following format: 'Den' + DDMMYYYYHHMMSS Please help me complete this task. Thanks, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Sub Testme01() dim ActWkbk as workbook set actwkbk = activeworkbook actwkbk.worksheets("Ric").copy 'to a new sheet with activesheet 'new ric sheet in new workbook .parent.saveas filename:=actwkbk.path & "\" & "Den" & _ format(now, "ddmmyyyyhhmmss") .parent.close savechanges:=false end with end sub Joe K. wrote: I have a spreadsheet with several worksheets, I would like to copy only the (RIC) worksheet to new spreadsheet. I would like the new spreadsheet to use same folder location as the old spreadhsheet and the name with the following format: 'Den' + DDMMYYYYHHMMSS Please help me complete this task. Thanks, -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Minor modifications...
Option Explicit Sub Testme01() dim ActWkbk as workbook set actwkbk = activeworkbook actwkbk.worksheets("Ric").copy 'to a new sheet in a new workbook with activesheet 'new ric sheet in new workbook .parent.saveas filename:=actwkbk.path & "\" & "Den" & _ format(now, "ddmmyyyyhhmmss") & ".xls" .parent.close savechanges:=false end with end sub I modified the comment on the .copy line and added ".xls" to the workbook name. Dave Peterson wrote: Option Explicit Sub Testme01() dim ActWkbk as workbook set actwkbk = activeworkbook actwkbk.worksheets("Ric").copy 'to a new sheet with activesheet 'new ric sheet in new workbook .parent.saveas filename:=actwkbk.path & "\" & "Den" & _ format(now, "ddmmyyyyhhmmss") .parent.close savechanges:=false end with end sub Joe K. wrote: I have a spreadsheet with several worksheets, I would like to copy only the (RIC) worksheet to new spreadsheet. I would like the new spreadsheet to use same folder location as the old spreadhsheet and the name with the following format: 'Den' + DDMMYYYYHHMMSS Please help me complete this task. Thanks, -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to create a spread sheet for time | Excel Worksheet Functions | |||
how do i look up and create excel spread sheets | Excel Worksheet Functions | |||
how do you to create a spread sheet from scratch | New Users to Excel | |||
how do you to create a spread sheet from scratch | New Users to Excel | |||
how do I create a login for a spread sheet | Excel Programming |