If the system finds "Agency & custodian", "10/2008" and "Deposit Placement/Rollover" then it will copy the values "1 2 3" from workbook(sample1) to another workbook(sample2) which had the same headings.
This is the coding that i had currently and i do not wish the system to copy the cells as if someone amend the worksheet, the values copied to another worksheet will be different and thus inaccurate but i do not know how to continue. I appreciate all helps. Thanks.
Private Sub cmdCopy_Click()
'when october and agency is chosen
If cbMonth = "October of 2010" And cbTean = "Agency & Custodian" Then
'open this workbook
Workbooks.Open Filename:="C:\Documents and Settings\A999416\Desktop\Project\bbca volume report 2010_may_team.xls"
'activate this workbook
Workbooks("bbca_mgt_report_wip.xls").Activate
'activate this worksheet
Sheets("Vol").Activate
R = Range("AF13:AF15").Select
Selection.Copy
'activate this workbook
Workbooks("bbca volume report 2010_may_team.xls").Activate
'activate this worksheet
Sheets("Agency 2010").Activate
'paste into this cell
Worksheets("Agency 2010").Range("M43:M45").PasteSpecial xlPasteValues
'save this workbook
ActiveWorkbook.Save
End If
End Sub
Bookmarks