Closed Thread
Results 1 to 16 of 16

Excel for Mac: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

  1. #1
    Registered User
    Join Date
    07-13-2017
    Location
    Puyallup, WA
    MS-Off Ver
    Excel for Mac (latest version)
    Posts
    26

    Excel for Mac: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    Hi all!

    I am new to this forum, and this is my first post, so cut me some slack, because I'm a little nervous, albeit very excited!

    I have a simple problem in Excel regarding the special paste command. Specifically, if I try to do a special paste for a selection as a "picture" (although the same problem occurs if I special paste my selection as a "PDF"). Oddly, if I perform these steps manually, I have no problem, and it works fine. But if I attempt to use the VBA code that was generated in the macro-record, the vba compiler hangs up on the special paste command when I add it to my vba code!

    Here is the simple process I do manually that works fine.

    I "Select All", (within the active worksheet that I am on), then I "Copy", and finally I select a special paste command using the "Picture" option. It does exactly what I want it to do. All of my individual graphs, plots, spread sheets, etc, from that sheet, are now saved as one solid picture.

    But if I attempt to implement the same command in VBA, then my program crashes on the "Special Paste" command.

    The code looks like this:
    Please Login or Register  to view this content.
    For some reason, the vba compiler crashes on the following line, even though this same command works fine when done manually!

    Please Login or Register  to view this content.
    Can somebody please, please, please, help me! It's been driving me nuts!

    I just retired from Boeing. I'm an engineer, and I am working on an automated spreadsheet that will help people on the ketosis diet.

    I really hope somebody can help me, because I can usually figure this stuff out using trial and error, but not tonight! Tonight, the clowns that live within my head (and sleep under my bed!), are all mocking me, and laughing out loud... with their big fat clown feet!

    Regards, Tony
    Last edited by AliGW; 07-15-2017 at 02:02 AM. Reason: Added missing CODE /CODE tags. Please read and follow the Forum Rules, link above in the menu bar. Thanks.

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    Hi Tony,
    welcome to the forum.
    Not sure where this line comes from, but I think you can just remove it.
    Please Login or Register  to view this content.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  3. #3
    Registered User
    Join Date
    07-13-2017
    Location
    Puyallup, WA
    MS-Off Ver
    Excel for Mac (latest version)
    Posts
    26

    Re: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    Sorry... but that's not working for me either. In fact, it made my pictures and graphs come out inverted.

    Like I said, it works perfect in manual mode. Only in VBA mode do I get an error.
    Last edited by tony333; 07-14-2017 at 04:51 AM.

  4. #4
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    Ok, then I'm affraid it's something specific for Mac. So I can't reproduce the issue.
    The forum has a section for non-windows platforms. May be you can post your question there.
    Sorry that I can't help you

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    welcome to the board, tony.

    Please Login or Register  to view this content.
    Should be able to do this without selecting, but it's not jumping out at me.

    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,404

    Re: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    This thread has now been moved to the correct forum.

    Tsjallie - please do not advise members to start new threads on the same issue - instead, suggest that they flag (report) their post so a moderator or administrator can move it. Thanks!
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,404

    Re: Excel for Mac: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    @Tony - the response you received in your duplicate thread has been moved here - see post #5 above - so you can respond to it here.

  8. #8
    Registered User
    Join Date
    07-13-2017
    Location
    Puyallup, WA
    MS-Off Ver
    Excel for Mac (latest version)
    Posts
    26

    Re: Excel for Mac: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    Thank you shg! Your code solved my problem.

    I am very grateful.

    I have one more bizzare issue, that is a bit random. But sometimes when I click on a spreadsheet tab, my vertical and horizontal scroll bars do not show up. If I move or resize my window (manually), they appear. Is there something I can put in my vba code to ensure they show up?

    And once again... Thank you!!!

    Regards, Tony

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Excel for Mac: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    You're welcome.

    I have no suggestion for the other problem.

  10. #10
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    Hi AliGW, thx for pointing out. Wasn't aware of that option yet.

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,404

    Re: Excel for Mac: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    Tsjallie - forum rule #5 (to which you agreed upon joining - perhaps you should read the rules?) states:

    5. Don't duplicate threads. If you have posted the question in one forum, do not post it again in another forum. You are duplicating efforts. If you feel the thread is in the wrong forum and needs to be moved to another forum, PM a mod / admin to do it for you.

  12. #12
    Registered User
    Join Date
    07-13-2017
    Location
    Puyallup, WA
    MS-Off Ver
    Excel for Mac (latest version)
    Posts
    26

    Re: Excel for Mac: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    I don't want to start any trouble, as a newcomer, (who just got his question answered, thankfully), but I think the advice to post in two different forums are valid under certain circumstances.

    Take my example, I first posted in the non-Mac forum, because I didn't think it was a Mac problem per se, plus, most of the experts post in that forum.

    And yet, by posting the same question in the Mac forum, I was able to get my question answered. And i still doubt it had anything to do with my Mac (although this latest scrolling issue sounds like a Mac/Excel issue).

    So it all worked out great.

    Thanks again.

  13. #13
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: Excel for Mac: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    Of course I read the rules. Apparently just hadn't this one in mind when it should be. Common old folks excuse

  14. #14
    Registered User
    Join Date
    07-13-2017
    Location
    Puyallup, WA
    MS-Off Ver
    Excel for Mac (latest version)
    Posts
    26
    Thank you, Tsjallie!

    Your advice, to post in the Mac forum, ultimately helped me get my solution.

    I'm just grateful... (not trying to start any rule wars).

    Regards, Tony

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,404

    Re: Excel for Mac: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    Tony - you would have got your solution anyway, had you bumped your original thread.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,404

    Re: Excel for Mac: Special Paste works fine Manually, BUT not in VBA! (Arrrghhh!)

    ... but I think the advice to post in two different forums are valid under certain circumstances.
    No, it isn't. Move on now, please.

    I'm closing the thread to close this discussion.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Help with modifying VBA Macro - Works fine but needs fine tuning !
    By stefan27 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-06-2015, 10:27 AM
  2. [SOLVED] Advanced Filter Macro does not work, running manually works fine
    By jamiemc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-09-2013, 07:22 PM
  3. Replies: 0
    Last Post: 12-13-2011, 05:13 PM
  4. Replies: 5
    Last Post: 11-08-2011, 05:18 PM
  5. Replies: 1
    Last Post: 07-15-2011, 01:24 AM
  6. Formula works only when I paste special and select values
    By mrcois in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-23-2010, 09:22 AM
  7. Works fine in debug, but...
    By DiBaco in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-24-2006, 12:40 PM

Tags for this Thread

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