I have a Macro that copies a selected range of data from part on an Excel file into a different Excel file and prints the copied data to the default printer.
I would like to modify the Macro to also copy the data to a second excel file - the same file and worksheet each time - and for this data to be overwritten each time the Macro is ran. The new file is called 'Upload.xls' and is located in the same folder as the other files
Can anyone assist? the VB Code is below
The Macro works on any version of Excel:
Thanks in advance
-----------
Sub only8elements()
'
' only12501 Macro
' Macro recorded 03/09/2007 by X
'
'
Range("A48
59").Select
Selection.Copy
Windows("C4SHEET.xls").Activate
Sheets("12501").Select
Range("A25").Select
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B26").Select
ActiveWindow.LargeScroll Down:=-1
Range("A1:J19").Select
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub
I would like to modify the Macro to also copy the data to a second excel file - the same file and worksheet each time - and for this data to be overwritten each time the Macro is ran. The new file is called 'Upload.xls' and is located in the same folder as the other files
Can anyone assist? the VB Code is below
The Macro works on any version of Excel:
Thanks in advance
-----------
Sub only8elements()
'
' only12501 Macro
' Macro recorded 03/09/2007 by X
'
'
Range("A48
Selection.Copy
Windows("C4SHEET.xls").Activate
Sheets("12501").Select
Range("A25").Select
ActiveSheet.Paste
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B26").Select
ActiveWindow.LargeScroll Down:=-1
Range("A1:J19").Select
Application.CutCopyMode = False
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub