keilah
08-28-2007, 06:10 AM
Hi
Need some assistance....in amending or even re writing the following code so that each time i save the workbook from July 07 to Aug 07......etc......rolling forward.....so aug 07 to sept 07 etc...
the macro refers to the current active workbook and runs......doing it origianl task, this is the field that i need to change on the file save as......to the next month
Workbooks("RevalComparisonModelJuly07test.xls").Activate
cannont seem to get it to work.....still trying
Sub ResertDataFields()
Dim strDate As String, strFile As String
strFile = "RevalComparisonModelJuly07test"
strDate = InputBox$("Enter save date - e.g. Aug07")
ActiveWorkbook.SaveAs ActiveWorkbook.Path & "R:\PricingModel-June07 to date\" & strFile & strDate & ".xls"
ResertDataFields ActiveWorkbook
Application.ScreenUpdating = False
Workbooks("Monthly Income Report.xls").Activate
Worksheets("Monthly Income Report").Select
Range("A1:N220").Select
Selection.Copy
Workbooks("RevalComparisonModelJuly07test.xls").Activate
Worksheets("IncomeReport-").Select
Range("A5:N220").Select
ActiveSheet.Paste
Application.ScreenUpdating = True
End Sub
CROSS-POSTED: http://www.experts-exchange.com/Q_22791433.html
Need some assistance....in amending or even re writing the following code so that each time i save the workbook from July 07 to Aug 07......etc......rolling forward.....so aug 07 to sept 07 etc...
the macro refers to the current active workbook and runs......doing it origianl task, this is the field that i need to change on the file save as......to the next month
Workbooks("RevalComparisonModelJuly07test.xls").Activate
cannont seem to get it to work.....still trying
Sub ResertDataFields()
Dim strDate As String, strFile As String
strFile = "RevalComparisonModelJuly07test"
strDate = InputBox$("Enter save date - e.g. Aug07")
ActiveWorkbook.SaveAs ActiveWorkbook.Path & "R:\PricingModel-June07 to date\" & strFile & strDate & ".xls"
ResertDataFields ActiveWorkbook
Application.ScreenUpdating = False
Workbooks("Monthly Income Report.xls").Activate
Worksheets("Monthly Income Report").Select
Range("A1:N220").Select
Selection.Copy
Workbooks("RevalComparisonModelJuly07test.xls").Activate
Worksheets("IncomeReport-").Select
Range("A5:N220").Select
ActiveSheet.Paste
Application.ScreenUpdating = True
End Sub
CROSS-POSTED: http://www.experts-exchange.com/Q_22791433.html