+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Paste and PasteSpecial

  1. #1
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167

    Paste and PasteSpecial

    I don't see the problem? Bob Philips originally helped with this project and everything worked fine, now the macro will not paste data from one workbook to another.

    The code, yea its ugly, just look at it with one eye and it aint so bad.
    Please Login or Register  to view this content.
    This bit "'ActiveSheet.Paste 'paste cells from original worksheet" is the code to paste which fails

    Error: Run-time error 1004
    Paste method of Worksheet class failed

    I am just copying cells A1 thru I102 and paste to another workbook in the same range. This macro worked fine until, dare I say it, the dreaded SP3. <sends shivers up my spine>

    As always, any help is appreciated.
    (Spell checker isnt working so you might want to close both eyes)
    Regards

    Rick
    Win10, Office 365

  2. #2
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167
    P.S.
    PasteSpecial did not work either.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Rick,

    Was this written in Excel 2003 and your now running it on Office 2007?

    Sincerely,
    Leith Ross

  4. #4
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167
    Hi Leith
    The code was written in Excel 2007.

  5. #5
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167
    Something I failed to take notice of, some of the files this macro will open are Excel 2003. With that, this macro did infact perform properly on thousands of files from either Excel 2003 or 2007.
    The code runs through complete if I block the Paste line of code.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Rick,

    I don't have 2007 yet. If you don't get an answer to your question soon, I will move your post to the 2007 Help forum.

    Sincerely,
    Leith Ross

  7. #7
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167
    You may not want Excel 2007

    Please move this to the 2007 forum, sorry I did not look for a specific forum. I will be more aware next time and I'm sure there will be a next time.

    Thank you

  8. #8
    Forum Contributor Rick_Stanich's Avatar
    Join Date
    11-21-2005
    Location
    Ladson SC
    MS-Off Ver
    Office365
    Posts
    1,167
    I have managed a work around for this. Having to utilize two seperate macros and workbooks for Excel 2007 and earlier versions due to worksheet format issues.
    Excel 2003 or earlier; requires workbooks and or worksheets in "xls" formatting.
    Please Login or Register  to view this content.
    To use Excel 2007 simply change this line of code "If Right(sFileName, 3) = "xls" Then 'check for "xls" suffix" to "If Right(sFileName, 4) = "xlsx" Then 'check for "xlsx" suffix" and use Excel 2007 workbooks and or worksheets.

    Hopefully this helps some one other than myself.

+ 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. Pastespecial - paste values
    By sapphire in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-28-2008, 06:19 PM
  2. PasteSpecial not working perfectly
    By ctmurray in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-12-2008, 04:20 PM
  3. Replies: 1
    Last Post: 02-27-2008, 07:54 PM
  4. PasteSpecial Formulas Macro
    By petehar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-04-2007, 04:39 PM
  5. Copy & Paste
    By Altec101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-30-2007, 09:31 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