+ Reply to Thread
Results 1 to 16 of 16

VBA to Auto Zip the Folder or Files

  1. #1
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007 & Excel 2010
    Posts
    115

    VBA to Auto Zip the Folder or Files

    Hello All,

    Could someone help me in Auto Zipping the Folders or Files from a specific location.

    I need a VBA code which will automatically zip the folders.

    Thanks in Advance.

    Regards
    Vinay

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

    Re: VBA to Auto Zip the Folder or Files

    http://www.rondebruin.nl/win/section7.htm

  3. #3
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007 & Excel 2010
    Posts
    115

    Re: VBA to Auto Zip the Folder or Files

    That was good but i need the VBA to Auto the Files or Folder as specified below.

    1. In a spread sheet "Sheet1" i have different input locations from "A1 to A25"
    2. Now when i run the VBA code it should Auto zip the files/Folders which are listed in "A1 to A25"

    Kindly help me on this.

  4. #4
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007 & Excel 2010
    Posts
    115

    Re: VBA to Auto Zip the Folder or Files

    can someone help me on this....

  5. #5
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007 & Excel 2010
    Posts
    115

    Re: VBA to Auto Zip the Folder or Files

    Hello All,

    I have a code which will Zip the Folders but this is limited to one folder.

    Whereas i have multiple folders which i cannot manually post it in the code.
    So i have attached a Workbook which has Source File location and Destination locations. Can u please make the necessary cahnges to this code, so that it will run for all the files.

    Also the output Zip name should be the source Folder name but when i execute the code it creates as .zip only.

    Kindly help me on this.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007 & Excel 2010
    Posts
    115

    Re: VBA to Auto Zip the Folder or Files

    Please help me on this.

  7. #7
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: VBA to Auto Zip the Folder or Files

    ok give me some time i will look it out this...
    Thanks - Naveed
    -----------------------------
    If the suggestion helps you, then Click * to Add Reputation
    To Attach File: Go Advanced>>Manage Attachments>>Add Files (In Top Right Corner)>>SelectFiles>>.........Locate Your File(s)>>Upload Files>>Done (In Bottom Right)
    1. Use [code] code tags [\code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    2. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

  8. #8
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: VBA to Auto Zip the Folder or Files

    vinay that locations which is there in column A that all folder name only right

  9. #9
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007 & Excel 2010
    Posts
    115

    Re: VBA to Auto Zip the Folder or Files

    Yes those are Folder Names

  10. #10
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007 & Excel 2010
    Posts
    115

    Re: VBA to Auto Zip the Folder or Files

    Do u have the chance to look into this.

  11. #11
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: VBA to Auto Zip the Folder or Files

    try this below code
    Please Login or Register  to view this content.
    open the file and change the 2nd row source & Destination Path and try it & let me know
    Attached Files Attached Files

  12. #12
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007 & Excel 2010
    Posts
    115

    Re: VBA to Auto Zip the Folder or Files

    Great!!!

    Its working.

    Thanks for the Help...

  13. #13
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: VBA to Auto Zip the Folder or Files

    Quote Originally Posted by mvinay View Post
    Great!!!

    Its working.

    Thanks for the Help...
    Glad to Help
    Please Mark this thread as SOLVED & Please Click on *Add Reputation to say thanks

  14. #14
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007 & Excel 2010
    Posts
    115

    Re: VBA to Auto Zip the Folder or Files

    oops!!!

    can it possible to start Auto zip all the listed files once i click it?

    It would be great if this is done.

    Thanks in advance

  15. #15
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: VBA to Auto Zip the Folder or Files

    Its Auto Zip only right ?

  16. #16
    Forum Contributor
    Join Date
    12-20-2012
    Location
    Hyderabad
    MS-Off Ver
    Excel 2007 & Excel 2010
    Posts
    115

    Re: VBA to Auto Zip the Folder or Files

    yes its for Auto Zip only.

+ 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. Replies: 1
    Last Post: 01-28-2019, 06:55 PM
  2. Auto import data from all text files in a folder (VBA)
    By anto80mtl in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2013, 12:34 PM
  3. Auto-Populating from all files in a designated folder
    By taketwo in forum Excel General
    Replies: 3
    Last Post: 10-22-2009, 12:13 PM
  4. auto open excel files in the folder
    By ccs1981 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-12-2009, 02:19 AM
  5. auto open the excel files in the folder
    By ccs1981 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2008, 04:16 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