philthepowerhouse
IS-IT--Management
Hi there,
I hope someone can help me as I am at my wits end!
I am trying to automate a boring process and below is the code I am using to do this:
*************************************************
Workbooks.Add
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "1995"
Range("A1").Select
ActiveWorkbook.SaveAs Filename:= _
"F:\PWay\FAME\Corporate Health Check\Final\Time Series\Excel\LQ_M_UQ_Grouped Ratios.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Workbooks.Open Filename:= _
"F:\PWay\FAME\Corporate Health Check\Final\Time Series\Excel\Final 1995.xls"
Sheets("Grouped Ratios").Select
Sheets("Grouped Ratios").Copy Before:=Workbooks("LQ_M_UQ_Grouped Ratios.xls") _
.Sheets(1)
Sheets("Grouped Ratios").Select
Sheets("Grouped Ratios").Name = "1995"
Range("A1").Select
ActiveWorkbook.Save
Windows("Final 1995.xls").Activate
ActiveWorkbook.Close
*******************************************************
Using a macro I want to add a new workbook and open another workbook followed by copying a worksheet from this workbook to the one I have just created and then close it once I have finished.
The macro will run so far e.g. create the new workbook and open the other but I cannot for the life of me get it to copy the data across. I have tried every method of copying and pasting possible but no hope.
Hope someone can help,
Many thanks in advance!
Powerhouse!
I hope someone can help me as I am at my wits end!
I am trying to automate a boring process and below is the code I am using to do this:
*************************************************
Workbooks.Add
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "1995"
Range("A1").Select
ActiveWorkbook.SaveAs Filename:= _
"F:\PWay\FAME\Corporate Health Check\Final\Time Series\Excel\LQ_M_UQ_Grouped Ratios.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Workbooks.Open Filename:= _
"F:\PWay\FAME\Corporate Health Check\Final\Time Series\Excel\Final 1995.xls"
Sheets("Grouped Ratios").Select
Sheets("Grouped Ratios").Copy Before:=Workbooks("LQ_M_UQ_Grouped Ratios.xls") _
.Sheets(1)
Sheets("Grouped Ratios").Select
Sheets("Grouped Ratios").Name = "1995"
Range("A1").Select
ActiveWorkbook.Save
Windows("Final 1995.xls").Activate
ActiveWorkbook.Close
*******************************************************
Using a macro I want to add a new workbook and open another workbook followed by copying a worksheet from this workbook to the one I have just created and then close it once I have finished.
The macro will run so far e.g. create the new workbook and open the other but I cannot for the life of me get it to copy the data across. I have tried every method of copying and pasting possible but no hope.
Hope someone can help,
Many thanks in advance!
Powerhouse!