Hi Guru's,
This would be a BIG help and would be a solution to months of work i have been completing.
I really need a macro written that will copy two sheets (sheet 1= rep data & sheet 2= stats) from a closed workbook into another individual workbook through macro button.
Lets call the workbook that has the two sheets "the Summary" and the the workbook that needs the two sheets "schedule".
I have toyed around but cant get it right.
i have used this previously but it does not work as it OPENS the workbook then dosent even copy the worksheets over.
'
Dim sourceSheet As Worksheet
Dim destSheet As Worksheet
' ' Copy Data
Workbooks.Open Filename:="P:\Shared\CONSUMER DIVISION SALE SCHEDULE\2010 Trackers\Reporting Summary\Sales Schedule Summary - Rep II.xls"
Set sourceSheet = Worksheets("Total Sales by Rep")
sourceSheet.Activate
sourceSheet.Cells.Select
Selection.Copy
' ' Paste Data
Workbooks.Open Filename:="P:\Shared\CONSUMER DIVISION SALE SCHEDULE\2010 Trackers\Home & Garden Sales Schedule - April 2010.xls"
Set destSheet = Worksheets("Total Sales by Rep")
destSheet.Activate
destSheet.Cells.Select
destSheet.Paste
' ' Copy Data 2
Workbooks.Open Filename:="P:\Shared\CONSUMER DIVISION SALE SCHEDULE\2010 Trackers\Reporting Summary\Sales Schedule Summary - Rep II.xls"
Set sourceSheet = Worksheets("Sales Stats")
sourceSheet.Activate
sourceSheet.Cells.Select
Selection.Copy
' ' Paste Data 2
Workbooks.Open Filename:="P:\Shared\CONSUMER DIVISION SALE SCHEDULE\2010 Trackers\Home & Garden Sales Schedule - April 2010.xls"
Set destSheet = Worksheets("Sales Stats")
destSheet.Activate
destSheet.Cells.Select
destSheet.Paste
ActiveWorkbook.Save
ActiveWorkbook.Close
ANY help would be appreciated - it seems a simple macro but i just cant work it out atm
Cheers all
This would be a BIG help and would be a solution to months of work i have been completing.
I really need a macro written that will copy two sheets (sheet 1= rep data & sheet 2= stats) from a closed workbook into another individual workbook through macro button.
Lets call the workbook that has the two sheets "the Summary" and the the workbook that needs the two sheets "schedule".
I have toyed around but cant get it right.
i have used this previously but it does not work as it OPENS the workbook then dosent even copy the worksheets over.
'
Dim sourceSheet As Worksheet
Dim destSheet As Worksheet
' ' Copy Data
Workbooks.Open Filename:="P:\Shared\CONSUMER DIVISION SALE SCHEDULE\2010 Trackers\Reporting Summary\Sales Schedule Summary - Rep II.xls"
Set sourceSheet = Worksheets("Total Sales by Rep")
sourceSheet.Activate
sourceSheet.Cells.Select
Selection.Copy
' ' Paste Data
Workbooks.Open Filename:="P:\Shared\CONSUMER DIVISION SALE SCHEDULE\2010 Trackers\Home & Garden Sales Schedule - April 2010.xls"
Set destSheet = Worksheets("Total Sales by Rep")
destSheet.Activate
destSheet.Cells.Select
destSheet.Paste
' ' Copy Data 2
Workbooks.Open Filename:="P:\Shared\CONSUMER DIVISION SALE SCHEDULE\2010 Trackers\Reporting Summary\Sales Schedule Summary - Rep II.xls"
Set sourceSheet = Worksheets("Sales Stats")
sourceSheet.Activate
sourceSheet.Cells.Select
Selection.Copy
' ' Paste Data 2
Workbooks.Open Filename:="P:\Shared\CONSUMER DIVISION SALE SCHEDULE\2010 Trackers\Home & Garden Sales Schedule - April 2010.xls"
Set destSheet = Worksheets("Sales Stats")
destSheet.Activate
destSheet.Cells.Select
destSheet.Paste
ActiveWorkbook.Save
ActiveWorkbook.Close
ANY help would be appreciated - it seems a simple macro but i just cant work it out atm
Cheers all