Hi,
I've been searching through various forums on the web and then attempted to search for a solution on Tek-tips, no luck. I've also seen that many are getting the same error that I was getting.
Using VBA within Excel, I want to open a zip archive and save to a selected folder. Here is my code:
'Dims and code to determine file and location
Call UnzipAFile(MyPath & LatestFile, MyPath)
Sub UnzipAFile(zippedFileFullName As Variant, unzipToPath As Variant)
Dim ShellApp As Object
Set ShellApp = CreateObject("Shell.Application")
ShellApp.Namespace(unzipToPath).CopyHere ShellApp.Namespace(zippedFileFullName).items 'this is where the error happens
End Sub
I keep getting the same runtime 91 error, "Object variable or With block variable set" and I've even added Microsoft Shell Controls and Automation to my references and same error.
Please help!!
Mark
I've been searching through various forums on the web and then attempted to search for a solution on Tek-tips, no luck. I've also seen that many are getting the same error that I was getting.
Using VBA within Excel, I want to open a zip archive and save to a selected folder. Here is my code:
'Dims and code to determine file and location
Call UnzipAFile(MyPath & LatestFile, MyPath)
Sub UnzipAFile(zippedFileFullName As Variant, unzipToPath As Variant)
Dim ShellApp As Object
Set ShellApp = CreateObject("Shell.Application")
ShellApp.Namespace(unzipToPath).CopyHere ShellApp.Namespace(zippedFileFullName).items 'this is where the error happens
End Sub
I keep getting the same runtime 91 error, "Object variable or With block variable set" and I've even added Microsoft Shell Controls and Automation to my references and same error.
Please help!!
Mark