+ Reply to Thread
Results 1 to 3 of 3

Problems opening one workbook, copying and then pasting into the first

  1. #1
    Registered User
    Join Date
    06-30-2010
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    1

    Problems opening one workbook, copying and then pasting into the first

    I created a macro that formats a report in one workbook and then opens another file macro_prep.xls. It then copies a range and should go back into the first workbook. However, when I run the macro it just copies the data and pastes it back into the Macro_Prep.xls. I believe my problem lies somewhere in the thisworkbook.activate line but am not sure. Any insight as to why this is happening would be greatly appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Problems opening one workbook, copying and then pasting into the first

    Hi jortarr;

    Not positive but try this:
    Please Login or Register  to view this content.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Problems opening one workbook, copying and then pasting into the first

    You'd better write in plain English what you want to accomplish with this macro (illustrated by a dummy example).
    Then you'll receive a 'solution' macro with 5 codelines that persorms what you want.
    E.g the code
    Please Login or Register  to view this content.
    can be replaced by
    Please Login or Register  to view this content.
    Last edited by snb; 07-02-2010 at 04:48 AM.

+ Reply to Thread

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