+ Reply to Thread
Results 1 to 2 of 2

How to zip files in MAC in VBA macro

  1. #1
    Registered User
    Join Date
    10-29-2020
    Location
    India
    MS-Off Ver
    15
    Posts
    2

    How to zip files in MAC in VBA macro

    Hiii All,

    I am looking for a VBA macro code where we have CSV files and an empty zip file. We need to add the csv files to the zip file. The code need to work for MAC. (Able to achieve for WINDOWS) We cannot use AppleScriptTask funstion as we cannot use a different scipt file. Please suggest if there is any other alternative.

    WINDOWS code that works:


    Set App = CreateObject("Shell.Application")

    App.Namespace(ZIPFILEPATH).CopyHere csvFileName

  2. #2
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: How to zip files in MAC in VBA macro

    Unless Excel for Mac has the equivalent of Excel for Windows's Shell function, you may not be able to do this.

    If Excel for Mac has Shell, you could use that to issue terminal commands from VBA, and I'm certain Macs come with either zip or gzip commands.

    If you can't use 'external' commands for Macs, realize that CreateObject("Shell.Application") uses VBScript/Windows Script Host facilities which are NOT part of Excel/Office but part of Windows. If you can't do the same on Macs, that is, use parts of macOS, then you simply won't be able to do as much on Macs as you can do on Windows.

+ 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. Macro for Creating one master data files from multiple files in the folder
    By NikhilDixit in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-13-2017, 03:10 PM
  2. [SOLVED] Macro to Import Multiple TXT Files into workbook - User to select files/directory
    By saber007 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-15-2013, 08:43 PM
  3. Replies: 0
    Last Post: 04-13-2013, 10:45 AM
  4. Noob 4 Help - Macro to LIST ALL FILES IN FOLDER and then IMPORT ALL LISTED FILES
    By StlSmiln in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2012, 04:02 AM
  5. Replies: 3
    Last Post: 04-08-2012, 06:52 PM
  6. Replies: 0
    Last Post: 03-15-2012, 04:13 PM
  7. Replies: 2
    Last Post: 11-30-2005, 01:55 AM

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