I need to copy multiple sheets into the template accordingly. well, i manage to copy for the first sheet only. i've tried to modify the code to copy multiple sheets at one time and i couldnt get it right. here's the code for copying the first sheet into the template. i have to specify the column as i just need certain column to be copied for that particular sheet.
i have five sheets; Year, Q1, Q2, Q3, Q4
here is my code;
Sub CopyCell()
Dim wbk As Workbook
Dim strFirstFile As String
Dim strSecondFile As String
strFirstFile = "C:\Documents and Settings\user\My Documents\FiST Mac\Data.xls"
strSecondFile = "C:\Documents and Settings\user\My Documents\FiST Mac\FiST_data_template.xls"
Set wbk = Workbooks.Open(strFirstFile)
With wbk.Sheets("Year")
Columns("A:AB").copy
End With
Set wbk = Workbooks.Open(strSecondFile)
With wbk.Sheets("Year")
Columns("B:AC").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
End With
wbk.SaveAs "C:\Documents and Settings\user\My Documents\FiST Mac\FISTdb.xls"
wbk.Close
End Sub