Excel Vba Zip File With Password Online

' Check if 7-Zip exists If Dir(sevenZipExe) = "" Then MsgBox "7-Zip not found. Install from https://www.7-zip.org" Exit Sub End If

Dim wsh As Object Set wsh = CreateObject("WScript.Shell") wsh.Run cmd, 0, True excel vba zip file with password

Dim wsh As Object Set wsh = CreateObject("WScript.Shell") wsh.Run cmd, 0, True ' Check if 7-Zip exists If Dir(sevenZipExe) =

Sub ZipWithPassword_WinRAR() Dim rarPath As String Dim source As String Dim target As String Dim pwd As String rarPath = "C:\Program Files\WinRAR\rar.exe" source = "C:\Temp\DataFolder" target = "C:\Temp\Secure.rar" ' WinRAR creates .rar, not .zip pwd = "Secret123" not .zip pwd = "Secret123"