Hello,
I need this to create a folder if one doesn't exist. I keep getting an error objtarget required on line 21 char 1.
Thank you!
strPath = "Path"
DeleteFolder strPath
Function DeleteFolder(strFolderPath)
Dim objFSO, objFolder
Set objFSO = CreateObject ("Scripting.FileSystemObject")
If objFSO.FolderExists(strFolderPath) Then
objFSO.DeleteFolder strFolderPath, True
End If
Set objFSO = Nothing
strZipFile = "Path" 'name of zip file
outFolder = "Path" 'destination folder of unzipped files
Set objShell = CreateObject( "Shell.Application" )
Set objSource = objShell.NameSpace(strZipFile).Items()
Set objTarget = objShell.NameSpace(outFolder)
intOptions = 4 + 16 + 1024
objTarget.CopyHere objSource, intOptions
End Function