Results 1 to 5 of 5
  1. #1
    kdbailey is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    228

    VBA Macro to Paste From Clipboard to Table

    I've been trying to figure out a way for my associates to be able to copy "Model Numbers" from either excel or another access table and be able to click a button that will import the clipboard into the necessary table to run specific data.



    Basically the clipboard will hold a single column of X rows of "Model Numbers". I'm looking for a macro that will take those records and paste them into [My Table].[Model Number]. Anybody have any ideas?

  2. #2
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,374
    Would you be better off just linking the Excel spreadsheet (like a table) without having to move stuff around? If not, the operation to paste data into a table is on the Ribbon (Paste Append). If you're looking to do this with a macro, turn on 'show all actions' on the ribbon and look at the command list for the action "RunCommand". I 99.9% never use macros, so that's about all I can offer.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    kdbailey is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    228
    The issue is that my colleagues could get their list of models from anywhere, and I'd prefer them not going into the background files (as other things will be happening when they are pasting into the table); they would likely miss things and would run into errors.

    I did discover the paste append command, and is the current method I'm using.

    If anybody else has any other ideas, please let me know.

  4. #4
    kdbailey is offline Competent Performer
    Windows 7 64bit Access 2007
    Join Date
    Aug 2012
    Posts
    228
    How do you paste append to a specific field within a table?

  5. #5
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,374
    You can't. I guess I assumed the target table only had one field because of the 'single column' part. Sorry.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 08-24-2015, 12:57 PM
  2. Macro/module to paste into an OLE object?
    By omahadivision in forum Modules
    Replies: 10
    Last Post: 08-29-2012, 05:01 PM
  3. Using the Clipboard in a Macro in a form
    By mchadwick in forum Forms
    Replies: 8
    Last Post: 06-14-2012, 10:47 AM
  4. Replies: 3
    Last Post: 12-17-2011, 02:32 PM
  5. Replies: 2
    Last Post: 06-06-2011, 04:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums