Results 1 to 2 of 2

Copy and paste values from one work book to another workbook

Threaded View

TheAnswer Copy and paste values from... 11-18-2010, 02:38 AM
royUK Re: Copy and paste values... 11-18-2010, 02:57 AM
  1. #1
    Registered User
    Join Date
    11-18-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    1

    Copy and paste values from one work book to another workbook

    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
    Attached Files Attached Files
    Last edited by TheAnswer; 11-18-2010 at 03:24 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1