+ Reply to Thread
Results 1 to 5 of 5

Import data to workbook - Paste values

  1. #1
    Forum Contributor
    Join Date
    01-06-2012
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    165

    Import data to workbook - Paste values

    Hi,

    I have a code which imports data from closed workbook, but I'd like it to paste values only:

    Here's the macro:

    Please Login or Register  to view this content.
    Guess I need to put in .PasteSpecial Paste:=xlPasteValues or something in some way but not sure??

    Any advice would be much appreciated, thanks.
    Last edited by BPSJACK; 09-10-2015 at 10:14 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2014
    Location
    England
    MS-Off Ver
    Excel 2003 - 2016
    Posts
    575

    Re: Import data to workbook - Paste values

    Tip: Turn on the macro recorder and then do a paste special with the values only box ticked. Then look at the code that's been recorded and you'll have the correct format.

  3. #3
    Forum Contributor
    Join Date
    01-06-2012
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    165

    Re: Import data to workbook - Paste values

    Thanks for the tip but this was not created using the macro recorder. It pulls data from a closed workbook at a specified location & AFAIK this action cannot be recorded.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Import data to workbook - Paste values

    Try:

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    03-24-2014
    Location
    England
    MS-Off Ver
    Excel 2003 - 2016
    Posts
    575

    Re: Import data to workbook - Paste values

    Quote Originally Posted by BPSJACK View Post
    Thanks for the tip but this was not created using the macro recorder. It pulls data from a closed workbook at a specified location & AFAIK this action cannot be recorded.
    It really can. You'd be surprised. At the very least, an ordinary paste special with the values only box ticked recorded will give you the correct format of the command so you can edit your code. You're right in saying the entire procedure can't be recorded in this way (well, sort of, a bit, well ok it can but anyway), but it's perfect to get the correct format of a command without having to waste time Googling or waiting for a reply in here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can I have Excel search another workbook for data and import it to my current workbook?
    By mgruber in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 0
    Last Post: 09-05-2014, 07:13 PM
  2. Replies: 0
    Last Post: 03-27-2014, 12:38 PM
  3. [SOLVED] Import data from an excel workbook to another workbook without manually selecting
    By rmachbitz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-15-2013, 02:27 PM
  4. Open workbook, filter values, copy/paste into Active workbook.
    By niceguy21 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2013, 12:17 PM
  5. Replies: 20
    Last Post: 07-26-2012, 04:02 PM
  6. Collecting Data from multiple sheets of a workbook and import them into new workbook
    By tufanayd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-16-2009, 04:10 PM
  7. [SOLVED] Can you import values from one workbook to another?
    By Phantom1219 in forum Excel General
    Replies: 2
    Last Post: 03-16-2006, 08:35 PM

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