Posted to microsoft.public.excel.programming
|
|
Zipping the current Excel Spreadsheet with PkZip
I copied the sub and both functions. Works great!
Thanks much!!
"Ron de Bruin" wrote:
Hi David
Copy the sub NewZip also in the module
--
Regards Ron de Bruin
http://www.rondebruin.nl
"David" wrote in message ...
I got a compile error at the NewZip (FileNameZip) line. Unexpected Sub,
Function, Property. What did I do wrong?
Dim strDate As String, DefPath As String, sFName As String
Dim oApp As Object, iCtr As Long
Dim FName, vArr, FileNameZip
DefPath = Application.DefaultFilePath
If Right(DefPath, 1) < "\" Then
DefPath = DefPath & "\"
End If
strDate = Format(Now, " dd-mmm-yy h-mm-ss")
FileNameZip = DefPath & "MyFilesZip " & strDate & ".zip"
'Browse to the file(s), use the Ctrl key to select more files
FName = Application.GetOpenFilename(filefilter:="Excel Files (*.xls),
*.xls", _
MultiSelect:=True, Title:="Select
the files you want to zip")
If IsArray(FName) = False Then
'do nothing
Else
'Create empty Zip File
NewZip (FileNameZip) 'Here is where the error pccurs.
Set oApp = CreateObject("Shell.Application")
"Ron de Bruin" wrote:
Hi David
If you use Win XP you can try
http://www.rondebruin.nl/windowsxpzip.htm
--
Regards Ron de Bruin
http://www.rondebruin.nl
"David" wrote in message ...
Is there anyway to zip the current spreadsheet using the DOS version of
PkZip? I don't have WinZip, but I do have PkZip. I just want to save the
worksheet with it's current name.
Thanks!
|