Hi Scott.
You code seems to be using some kind of library/class that I don't
recognise, so can't comment.
The code accepts a folder name into the string variable strFolderName, but
does not appear to be using that folder name anywhere.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Scott" <sm****@ii.net> wrote in message
news:41***********************@per-qv1-newsreader-01.iinet.net.au...
Allen,
Thanks for your reply. I am hoping you don't mind helping here as I am
having a little difficulty with the suggested code.
I will paste my code below, but basically what I am trying to do is have a
button that I press which activates a zip function for backing up. The
code
you suggested allows me to select the location, but for some reason will
only store the ziped files into the "My Documents" dir. If I had hair, I
would have pulled it all out by now.
Thanks again for any assistance you can offer.
Scott :o)
************Start Code***********************
Private Sub Zip_Tables_Now_Click()
Dim Zip, i
Set Zip = CreateObject("Zip.Cntrl")
Dim strFolderName As String
Zip.CreateZip "tables.zip", ""
strFolderName = BrowseFolder("Where do you want to back up your files
to?")
If (DbName = "Cancel") Then
Beep
MsgBox "You must select a valid Location for your Tables!!", vbCritical
End If
i = DbName
Zip.AddFile i, ""
Zip.Close
Beep
MsgBox "Completed! Your file is zipped.", vbInformation
End Sub
************End Code***********************