Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save worksheet as new workbook
I have a workbook as a template that I do not want to change. Through
a userform button I would like to have VB save "MySheet" as a new workbook and have the user be able to choose the name of the new workbook. Is this possible? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save worksheet as new workbook
Please give me the full name of your workbook example My sheet.xls
then maybe i could help "stewart" wrote: I have a workbook as a template that I do not want to change. Through a userform button I would like to have VB save "MySheet" as a new workbook and have the user be able to choose the name of the new workbook. Is this possible? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save worksheet as new workbook
First problem solved. I worked at it a little more and all I had to
do was change my order of operations and it worked. I came out with this. Private Sub btnFinish_Click() Cells.Select Selection.Copy Workbooks.Add ActiveSheet.Paste 'ActiveSheet.Shapes.Range(Array("Button 1", "Button 2", "Button 3")).Select Application.CutCopyMode = False 'Selection.Delete Range("P8").Select end sub On Apr 7, 10:51 pm, "stewart" wrote: I have a workbook as a template that I do not want to change. Through a userform button I would like to have VB save "MySheet" as a new workbook and have the user be able to choose the name of the new workbook. Is this possible? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save worksheet as new workbook
Stewart
try this Private Sub btnFinish_Click() Application.ScreenUpdating = False 'Turn off will speed up macro Range("A1").Select 'This will return the cursor to cell A1 'one code for copy and paste Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Copy 'Code below shows how to add more sheets to code 'Sheets(Array("Sheet1", "Sheet2", "Sheet3", "Sheet4")).Copy 'ActiveSheet.Shapes.Range(Array("Button 1", "Button 2", "Button3")).Select Application.ScreenUpdating = True 'Turn screen updating back on End Sub "stewart" wrote: First problem solved. I worked at it a little more and all I had to do was change my order of operations and it worked. I came out with this. Private Sub btnFinish_Click() Cells.Select Selection.Copy Workbooks.Add ActiveSheet.Paste 'ActiveSheet.Shapes.Range(Array("Button 1", "Button 2", "Button 3")).Select Application.CutCopyMode = False 'Selection.Delete Range("P8").Select end sub On Apr 7, 10:51 pm, "stewart" wrote: I have a workbook as a template that I do not want to change. Through a userform button I would like to have VB save "MySheet" as a new workbook and have the user be able to choose the name of the new workbook. Is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save worksheet vs workbook | Excel Programming | |||
Save just a worksheet from a workbook | Excel Programming | |||
Save Every Worksheet as its own Workbook | Excel Programming | |||
Save Workbook or worksheet | Excel Programming | |||
save worksheet as new workbook | Excel Programming |