Explain Code

B

brad

Thanks for taking the time to read my question.

I have the following code that zips a file using WinZip.
I don't understand what it is doing. Can anyone explain
it to me?

Thanks

Brad

Dim ZipIt as String

ZipIt = Shell("C:\Program Files\WinZip\winzip32.exe" & " -
min -a """ & "Place Name of File and File Locatoin of
Zip File here" & """ """ & "Place Name of File and File
Location of Zipped File here" & """ ", vbMaximizedFocus)
 
R

Rick Brandt

brad said:
Thanks for taking the time to read my question.

I have the following code that zips a file using WinZip.
I don't understand what it is doing. Can anyone explain
it to me?

Thanks

Brad

Dim ZipIt as String

ZipIt = Shell("C:\Program Files\WinZip\winzip32.exe" & " -
min -a """ & "Place Name of File and File Locatoin of
Zip File here" & """ """ & "Place Name of File and File
Location of Zipped File here" & """ ", vbMaximizedFocus)

The Shell function is basically a mechanism for executing an external command just as
you would at a DOS prompt or in the Start - Run dialog. What you have there is a
template for using the WinZip command line functions and place-holder phrases have
been inserted where you need to add in your file names.

The syntax seems fairly straight-forward. It is launching WinZip and indicating what
zip file to create and what file should be zipped up inside of it. You would need to
examine the documentation for WinZip to learn anything further.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top