+ Reply to Thread
Results 1 to 5 of 5

Adapting this Save as PDF code to Mac

  1. #1
    Forum Contributor
    Join Date
    08-12-2019
    Location
    NYC
    MS-Off Ver
    2019
    Posts
    155

    Adapting this Save as PDF code to Mac

    Hi guys,

    I've been using the following VBA code to run a "save as PDF" macro but it seems that the code won't run on mac computers:
    Please Login or Register  to view this content.
    Do you know what generates the error and what I should replace it with?

    Thank you

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Adapting this Save as PDF code to Mac

    But what error, what description, what number ?
    Even people who know mac may have difficulty identifying with such a scant, small description.
    I do not know so much about mac, but I have such comments:
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Adapting this Save as PDF code to Mac

    Please explain what "doesn't work" means.
    • Does the code run?
    • Does it run but do nothing?
    • Does it produce error messages? If so, what do the messages say?
    • Does it produce unexpected/wrong results? If so, how do the results differ from what you expect?
    • Does it hang?

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Adapting this Save as PDF code to Mac

    Please Login or Register  to view this content.
    That's a Windows path separator, so change it to
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-12-2019
    Location
    NYC
    MS-Off Ver
    2019
    Posts
    155

    Re: Adapting this Save as PDF code to Mac

    Sorry for this very late answer. Jindon, I've made the change you suggested but the error remains the same. I turned off the errHandler to see the real error and the message is the following:
    "Compile error in hidden module: "Module1". This error commonly occurs when code is incompatible with the version, platform, or architecture of this application"

    Module1 is the module with the code that I mentioned in my first post.

    Similarly, my other sub to print (not save as pdf) also doesn't work on Mac, based on the following code:
    Please Login or Register  to view this content.
    The error message being in this case: "Run-Time error '1004': PrintPreview method of Worksheet class failed"

    If anyone has ideas, I'm listening! Appreciate your help on that, thanks again

+ 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. [SOLVED] Adapting Existing Code to Offer Option to Save to Existing Folder
    By AliGW in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-28-2019, 07:37 AM
  2. [SOLVED] listbox code needs adapting
    By flyinghigher2011 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2013, 06:27 AM
  3. Adapting VBA Code
    By Paul Cooke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2013, 10:12 AM
  4. Help with adapting a matlab code to vba
    By h3lla in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-07-2012, 04:12 AM
  5. Adapting this code to have a set range
    By MasonSinclair in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-21-2011, 04:50 AM
  6. Adapting VBA Code
    By smurray444 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2007, 05:30 AM
  7. Adapting some code
    By chrisrowe_cr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-16-2005, 09:05 AM

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