keilah
08-28-2007, 01:39 AM
Hi
is it possible to amend to the following VBA code, so the each time i save the workbook to the following month from the previous months name....
i.e....July07 to Aug 07
the part i need to amend in the code refers to the following line;
RevalComparisonModel.xls - so that this changes as i change the workbook name to the following month from the previous months name.......
Sub ResertDataFields()
Application.ScreenUpdating = False
Workbooks("Monthly Income Report.xls").Activate
Worksheets("Monthly Income Report").Select
Range("A1:N220").Select
Selection.Copy
Workbooks("RevalComparisonModel.xls").Activate
Worksheets("IncomeReport-").Select
Range("A5:N220").Select
ActiveSheet.Paste
Application.ScreenUpdating = True
End Sub
is it possible to amend to the following VBA code, so the each time i save the workbook to the following month from the previous months name....
i.e....July07 to Aug 07
the part i need to amend in the code refers to the following line;
RevalComparisonModel.xls - so that this changes as i change the workbook name to the following month from the previous months name.......
Sub ResertDataFields()
Application.ScreenUpdating = False
Workbooks("Monthly Income Report.xls").Activate
Worksheets("Monthly Income Report").Select
Range("A1:N220").Select
Selection.Copy
Workbooks("RevalComparisonModel.xls").Activate
Worksheets("IncomeReport-").Select
Range("A5:N220").Select
ActiveSheet.Paste
Application.ScreenUpdating = True
End Sub