- Katılım
- 14 Ağustos 2011
- Mesajlar
- 212
- Excel Vers. ve Dili
- 2019 TR
- Altın Üyelik Bitiş Tarihi
- 18-07-2024
Kod:
Private Sub CommandButton12_Click()
Dim strDate1 As String, Yol1 As String, FileNameZip1 As String
Call Zip_ActiveWorkbook
strDate1 = Format(Now, "dd/mm/yyyy hh:mm")
FileNameZip1 = "C:\excel web\Yedek" & "\" & Left(ActiveWorkbook.Name, _
Len(ActiveWorkbook.Name) - 4) & ".zip"
Yol1 = ActiveWorkbook.Path & "\" & Left(ActiveWorkbook.Name, _
Len(ActiveWorkbook.Name) - 4) & " " & ".xls"
dosya = Dir("C:\excel web\Temp\*.*")
If dosya <> "" Then
Set fs = CreateObject("Scripting.FileSystemObject")
Kontrol = Dir("C:\excel web\Yedek\" & dosya)
If Kontrol <> "" Then
Kill ("C:\excel web\Yedek\" & dosya)
End If
fs.movefile "C:\excel web\Temp\*.Zip", "C:\excel web\Yedek"
MsgBox " [ " & Yol1 & " ] " & strDate1 & " Tarihinde Winzip İle Aşağıdaki Gibi Yedeklendi.!! " & vbCrLf & " [ " & FileNameZip1 & " ]", vbOKOnly, "excel web"
Else
MsgBox "[ " & ActiveWorkbook.Name & " ]" & " Winzip İle Yedeklenmedi..!!", vbCritical, "excel web"
End If
End Sub