+ Reply to Thread
Results 1 to 11 of 11

automatic Copy/Paste Values Before file save

  1. #1
    Registered User
    Join Date
    03-13-2012
    Location
    Burlington Ontario
    MS-Off Ver
    Excel 2010
    Posts
    51

    automatic Copy/Paste Values Before file save

    I'm trying to get my file to execute a copy paste value function anytime someone saves the file.

    Copy Range = ("N1:O1")

    Paste Range = First open row in Column "L"

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,834

    Re: automatic Copy/Paste Values Before file save

    Maybe:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    03-13-2012
    Location
    Burlington Ontario
    MS-Off Ver
    Excel 2010
    Posts
    51

    Re: automatic Copy/Paste Values Before file save

    Pasted this into the code for the worksheet tried saving. Nothing happens. What am I missing?

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: automatic Copy/Paste Values Before file save

    Get rid of that Sub CopyData:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,834

    Re: automatic Copy/Paste Values Before file save

    @xladept: Thank you for picking that up. I initially had the code in a regular sub and then copied it to the Workbook_BeforeSave but I copied one too many lines.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: automatic Copy/Paste Values Before file save

    @Mumps1 - You're welcome Maybe you can pick up some of mine

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,834

    Re: automatic Copy/Paste Values Before file save

    They're probably few and far between.

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: automatic Copy/Paste Values Before file save

    More often than yours(!)

  9. #9
    Registered User
    Join Date
    03-13-2012
    Location
    Burlington Ontario
    MS-Off Ver
    Excel 2010
    Posts
    51

    Re: automatic Copy/Paste Values Before file save

    Works....kind of. It isnt pasting values.

    Thanks for the help

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: automatic Copy/Paste Values Before file save

    Maybe:


    Please Login or Register  to view this content.

  11. #11
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: automatic Copy/Paste Values Before file save

    Thanks for the rep!

+ 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. Excel to open file, copy paste as values and save as excel
    By Adelin in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 05-10-2017, 06:18 AM
  2. Replies: 0
    Last Post: 03-11-2014, 08:18 AM
  3. Replies: 0
    Last Post: 01-29-2014, 07:38 AM
  4. Replies: 0
    Last Post: 11-10-2012, 07:05 PM
  5. Macro to open file, copy paste as values and save as excel html
    By gsav in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-18-2011, 10:15 AM
  6. automatic copy and paste as values
    By guerillaexcel in forum Excel General
    Replies: 2
    Last Post: 04-15-2010, 06:26 AM
  7. copy-paste from one xl wbook in to another and then save it as a .txt file.
    By biggles in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2007, 01:29 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