avidlearner
New Member
- Joined
- Apr 12, 2009
- Messages
- 5
Hi all,
I'm new to this forum and need help with a zip file macro. Basically I need the macro to zip up a number of files separately. I have something like this:
Sub Zipfile1()
Dim source As String
Dim target As String
source = "F:\Macro test\LNSPY.xls"
target = "F:\Macro test\LNSPY.zip"
Shell "C:\Program Files\WinZip\WINZIP32.EXE -a -r " & target & " " & source
End Sub
However, when i run the macro, there's a error saying "No files were found for this operation - nothing to do. (F:\Macro.zip).
Can someone help by telling me what is missing in my macro? Also, can you show me how to create a loop so that after zipping file1 = LNSPY.xls, I can zip up 3 more other files with a different name.
Thanks in advance.
I'm new to this forum and need help with a zip file macro. Basically I need the macro to zip up a number of files separately. I have something like this:
Sub Zipfile1()
Dim source As String
Dim target As String
source = "F:\Macro test\LNSPY.xls"
target = "F:\Macro test\LNSPY.zip"
Shell "C:\Program Files\WinZip\WINZIP32.EXE -a -r " & target & " " & source
End Sub
However, when i run the macro, there's a error saying "No files were found for this operation - nothing to do. (F:\Macro.zip).
Can someone help by telling me what is missing in my macro? Also, can you show me how to create a loop so that after zipping file1 = LNSPY.xls, I can zip up 3 more other files with a different name.
Thanks in advance.