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? |
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? |
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? |
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? |
All times are GMT +1. The time now is 12:52 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com