+ Reply to Thread
Results 1 to 7 of 7

VBA Code not working from Windows to Mac

  1. #1
    Registered User
    Join Date
    06-23-2010
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    13

    VBA Code not working from Windows to Mac

    Hi there, I used the following code on a Windows computer using Excel 2013, and it worked great, but when I try it on my Mac using Excel 2011, i get a "object does not support this property or method" error for PreserveFormatting, RefreshPeriod, WebSelectionType, etc.

    Any way I can fix this issue, or another code that would solve my problem? Thanks for your help.

    Code:
    HTML Code: 

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: VBA Code not working from Windows to Mac

    You can use conditional compilation.

    Please Login or Register  to view this content.
    In your situation, it might look like
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    06-23-2010
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA Code not working from Windows to Mac

    I am still getting errors. Do you know why I am getting an error on .PreserveFormatting, or .RefreshPeriod? Is the coding different on Mac versus PC?

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: VBA Code not working from Windows to Mac

    Those properties are not supported in Excel 2011.
    Similarly, neither ActiveX controls or the Dictionary object is supported for Mac Excel.
    When you find a property that isn't supported by Mac, conditional compiling can avoid compile errors.

  5. #5
    Registered User
    Join Date
    06-23-2010
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA Code not working from Windows to Mac

    Do you know a code that I would be able to use to get the data on Mac that I was previously getting on Windows?

  6. #6
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: VBA Code not working from Windows to Mac

    What data?

  7. #7
    Registered User
    Join Date
    06-23-2010
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: VBA Code not working from Windows to Mac

    The tables I'm trying to pull from baseball-reference.com. If it won't work with the code above, how can I change that code so it will work?

+ 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] Code not working on Windows 8
    By Tejas.T in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-11-2014, 10:22 AM
  2. VBA code Error after changed to windows 7, working fine in windows XP before
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-11-2014, 06:23 AM
  3. Macros created in Windows XP not opening /working in Windows 7
    By Janane in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2012, 04:28 AM
  4. ocde working in one windows login but stopped working in another.
    By rama1209 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2011, 08:38 AM
  5. [SOLVED] Windows Encryption Code not working with Userform
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2006, 06:30 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