+ Reply to Thread
Results 1 to 5 of 5

Help with copy text from one workbook to another.

  1. #1
    Registered User
    Join Date
    03-23-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    37

    Help with copy text from one workbook to another.

    Here is what I came up with using the macro recorder. The Report Template.xlsm is the sheet containing the macro.
    Please Login or Register  to view this content.
    It opens the sheet and then just stops. Any Tips?
    Last edited by jcranst; 05-02-2012 at 08:20 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Help with copy text from one workbook to another.

    Your code states
    Please Login or Register  to view this content.
    Shouldnt it be
    Please Login or Register  to view this content.
    Also you can change this part
    Please Login or Register  to view this content.
    To
    Please Login or Register  to view this content.
    This code will copy the data from the 1st worksheet of the Template for vlookups file to the 1st worksheet in this workbook (Report template which contains the macro) in column B - last available row.
    Last edited by arlu1201; 05-02-2012 at 08:27 AM.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    03-23-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Help with copy text from one workbook to another.

    Thanks for the reply. The macro seems to stop after the vlookup sheet is opened.
    Please Login or Register  to view this content.
    I added the Msgbox at the end to see if the macro keeps running. The message box does not appear.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Help with copy text from one workbook to another.

    Why dont you attach a sample of both your files? It will be easier to troubleshoot.

  5. #5
    Registered User
    Join Date
    03-23-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    37

    Re: Help with copy text from one workbook to another.

    I got it! Thanks for your help. After some more google searches I found that having shift in your keyboard shortcut stops the macro when opening sheets. I am still not sure why. I changed the short cut and it works.

+ 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