VBA to Zip all Folders into files separately with same name

fleyd

New Member
Joined
Jan 21, 2020
Messages
22
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. Web
Hello everyone,

I have searched the forum but cant seem to find exactly what I'm looking.

I would like a VBA code that according the folder where excel file (VBA) is:
- Will zip all folders (and it´s content) into zip files with the same names
- Don´t want or need to choose names of the files or destination folders
- Destination folder must be the exact same folder where the excel file with the VBA code is
- The folder will be / is a windows network folder

Imagine my excel file is at folder name Fruit, and inside that folder i have sub Folders:
apple
grapes
almonds


What i want, is to run the macro and on that same folder, Fruit, have apple.zip + grapes.zip + almonds.zip
And if i run the macro again, the code should overwritten the zip files according to the new files or folders inside folder Fruit

Appreciate your help, i have tried other codes here from the forum but for some reason i couldn't get them to work, mainly because they do different things from what i´m looking.
 
Hi again fleyd. It would probably be pretty easy to determine by code how big the file size is (ie. is it larger than 28MB) but as for splitting it into smaller pieces I have no ideas how to make this possible. I'll google around and reply if I happen to find anything similar. Sorry I can't be of any other assistance. Good luck. Dave
Hi,

Ok, in case you find anything, let me know. If not, I can only thank you for trying to help.

Cheers.
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top