Dear All,
I have a riddle here confusing me , I did a file where it create a sheets with names based on varibales i provide , so far it is working perfect however i wanted to export those data to a new excel workbook instead being in the same workbook as additional sheets , so i tried below , it create a new work book but don't paste selection to it .
Sub Button12_Click()
On Error Resume Next
Dim Num As Long
Dim Val As String
(......)
Val = Sheets("Source Data").Range("F2").Value
ActiveSheet.Name = Val
Worksheets(nname.Value).Cells.Select.all
Worksheets(nname.Value).Cells.Selection.Copy
Sheets(nname.Value).Move after:=Worksheets(Worksheets.Count)
Workbooks.Add
ActiveWorkbook.SaveAs Filename:=Val & ".xls"
Windows(Val & ".xls").Activate
ActiveSheet.Paste
What i need help in :
1) to copy all sheets after a sheet called " Summary " and paste those in new workbook i created with the name of variable val
2) asking if i could instead of set name automatically from my side , if it is possible to make it show a save as/export file box to let user pick name and place , that would be much convenient
Bookmarks