Wise Owl Answers - How do I unzip files using VBA?

preview_player
Показать описание
By Andrew Gould

If you'd like to help fund Wise Owl's conversion of tea and biscuits into quality training videos you can join this channel to get access to perks:

This video shows you how to use the Windows Shell object to unzip a folder with VBA. You'll learn how to reference the Microsoft Shell and Automation Controls library and create a new instance of the Shell class. You'll see how to reference folders using the Namespace method, how to apply the CopyHere method to a destination folder and use the Items method to return the contents of a zipped folder. You'll also see how to achieve the same results using either early-binding or late-binding techniques.

Chapters
00:00 The Question
00:29 Creating a New Shell Object
01:53 Referring to Folders using the Namespace Method
04:10 Unzipping Files with the CopyHere Method
05:28 Overwriting Existing Files
07:02 Tidying Up the Code
09:31 Changing from Early Binding to Late Binding
11:22 Taking Care with Data Types

Рекомендации по теме
Комментарии
Автор

Brilliant! Thank you for explaining all the little details. Very, very helpful. Thank you, again.

CeliaAlvesSolveExcel
Автор

this is another mind blowing from Thank you very much, Andrew

KawanExcel
Автор

Wow.. thanks Andrew! As usual, you go above and beyond the basic answer to fill in a lot of useful background and optional information and methodology to solve VBA challenges. Thanks for sharing this great technique :)) Thumbs up!!

wayneedmondson
Автор

Thanks for great lesson, you didn't miss no one of details i need, i mean "late binding", i like it more than "early binding", because it's easy for end users.

nikolaytkachenko
Автор

Thank you! I really appreciate how you explain things and show/demonstrate the what and why.

KM-comx
Автор

Such a great lesson!
I truly adore the way you teach.

piotrkuc
Автор

Hello, Andrew! I'm so grateful to you because you answered my question in so many details! Now, it's time to improve my routine. God bless you!

marcelofreitas
Автор

greatly explained! thanks for the tip for the Variant use. I guess that's the way to cope with the zero terminated strings within vba

hadibq
Автор

Love to see your face Andy, I hope you are always in good health with your family thanks for video tutorials😊👍👍🙏

simpabar
Автор

plz more of these (small) Library examples 👍

(winapi, shell, internet explorer and so on)
i know you did a lot of it in many videos. This small examples with your excelent explaination are in my opinion very helpful

kolavithonduraski
Автор

Awesome and brilliant my tutor. Thank you very much.

KhalilYasser
Автор

THANKS.... Waiting for your pdf automation topics with VBA.

baludevunipalli
Автор

Question please... What if you have multiple .zip files in the folder along with other file types... How would you loop thru and unzip only the .zip files? Thank You! I'm struggling with this.

I figured it out... using a combination of watching you Files & Folders video and this one. Thank You again. You're Awesome!

KM-comx
Автор

Thanks Andy very much.

Question: When should I use Late binding, and when should I use early binding?

youssefsedkey
Автор

Thank you very much Andy! You are an incredible person.
I am starting with VBA so I have another question related to this topic: when moving this files from a folder to another, how can I get to rename them ? I've looked through your videos but didn't find anything....

elenacorchetevila
Автор

Thank a lot, i keep getting error with the late binding method so searched for an early bind and found this video

ncalc
Автор

Thank you Andrew, I could again learn something new and it was so well explained. Just a question: is there a solution for this also with file system object class?

markbocsor
Автор

Thanks Andrew Sir for sharing unique tricks. sir my question is how convert any folder in zip file?

PankajNegi
Автор

Thanks Andrew. Is there a way to unzip password-protected Zip?

manoj
Автор

Thank you Andrew for the amazing tutorial. Can you please make a video on creating PDF files using VBA. By the way, I guess this week is going to be pretty busy in Manchester because of Cricket and Football. :P

tejamarneni