Dear All,
I created a macro which copy a spreadsheet and paste it as values in a new workbook:
Can anyone help me to develop a macro such as be able to copy (from the same old one) and paste as values a 2nd or 3rd spreadsheet (into the same a new one).
I would appreciate any help.
I created a macro which copy a spreadsheet and paste it as values in a new workbook:
Code:
[FONT=Calibri][SIZE=3]Sub Moving()[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]Application.ScreenUpdating = False[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]Dim varPath As String[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]Dim WbOpen As Workbook[/SIZE][/FONT]<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p>[FONT=Calibri][SIZE=3] [/SIZE][/FONT]</o:p>
[FONT=Calibri][SIZE=3]Set WbOpen = Workbooks.Add[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]varPath = coding.Range("b1").Value[/SIZE][/FONT]
<o:p>[FONT=Calibri][SIZE=3][/SIZE][/FONT]</o:p>
[FONT=Calibri][SIZE=3]bonddashboard.Copy before:=WbOpen.Sheets(1)[/SIZE][/FONT]
[FONT=Calibri][SIZE=3] [/SIZE][/FONT]
[FONT=Calibri][SIZE=3]Application.DisplayAlerts = False[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]WbOpen.SaveAs varPath & "\Fixed Income Dashboard-" & Format(Date, "dd-mmm-yyyy") & ".xlsx"[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]Application.DisplayAlerts = True[/SIZE][/FONT]
<o:p>[FONT=Calibri][SIZE=3] [/SIZE][/FONT]</o:p>
[FONT=Calibri][SIZE=3]Cells.Select[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]Selection.Copy[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]Application.CutCopyMode = False[/SIZE][/FONT]
<o:p>[FONT=Calibri][SIZE=3] [/SIZE][/FONT]</o:p>
[FONT=Calibri][SIZE=3]WbOpen.Close savechanges:=True[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]Application.ScreenUpdating = True[/SIZE][/FONT]<o:p>[FONT=Calibri][SIZE=3] [/SIZE][/FONT]</o:p>
[FONT=Calibri]End Sub[/FONT]
Can anyone help me to develop a macro such as be able to copy (from the same old one) and paste as values a 2nd or 3rd spreadsheet (into the same a new one).
I would appreciate any help.