Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub CommandButton7_Click()
- [...]
- If OptionButton1.Value = True Then
- strZipPath = tbxFilePathLF
- strZipName = "access_logfile_" & strEDate & ".txt.gz"
- ElseIf OptionButton2.Value = True Then
- strZipPath = tbxFilePathLF
- strZipName = "error_logfile_" & strEDate & ".txt.gz"
- errorLogFile = Split(strURL, "file=")
- errorFile = Split(errorLogFile(1), ".")
- End If
- CopyURLToFile strURL, strZipPath & strZipName
- DeleteUrlCacheEntry (strURL)
- Exit For
- End If
- Next objLink
- On Error GoTo Fin
- strZip = ThisWorkbook.Path & "\7za.exe"
- strPathZ = tbxFilePathLF
- gzFile = strZipPath & strZipName
- strFileName = gzFile
- strArg = strZip & " e -pHIDE " & strFileName & " -y -o" & strZipPath
- ShellAndWait strArg
- [...]
- End Sub
- Private Sub ShellAndWait(ByVal strPathName As String)
- Dim WshShell As Object
- On Error GoTo Fin
- Set WshShell = CreateObject("WScript.Shell")
- WshShell.Run strPathName, 0, True
- Fin:
- Set WshShell = Nothing
- If Err.Number <> 0 Then MsgBox "Error: " & _
- Err.Number & " " & Err.Description
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement