![]() |
Unzip message box supression
Hi there-
I've built a macro that basically opens a series of files, does some manipulations, then saves them with a different name. All file names and manipulations are laid out in a spreadsheet the macro is reading. Some of these files come zipped. The macro is able to unzip the files, but frequently some or all of these files are already in the destination folder. If this is the case, then I do NOT want the file from the zip folder to overwrite the one in the destination folder (if it's already in the destination folder, then it will either be the same one that's in the zip, or one that has been updated. It's these potential updates I don't want to overwrite). I'd like to answer the "Confirm Overwrite" message box that comes up during the unzip process with a "No". DisplayAlerts=False hasn't worked (I imagine because it's more of a 'windows' dialog box than an 'excel' one?), and even if it did, I think it would be a problem because the default answer is "Yes". This is strictly a 'nice to have' for the macro, but any help you can provide would be appreciated. I'm including the language used in the unzipping process (which I borrowed from www.rondebruin.nl/windowsxpunzip.htm): If Cells(Grow, 3) = "zip" Then Dim oApp As Object Dim Fname As Variant Dim FileNameFolder As Variant Dim DefPath As String Fname = SourcePath & GFolder & "\" & Cells(Grow, 7) 'Destination folder DefPath = SourcePath & GFolder If Right(DefPath, 1) < "\" Then DefPath = DefPath & "\" End If FileNameFolder = DefPath 'Extract the files into the Destination folder Set oApp = CreateObject("Shell.Application") oApp.Namespace(FileNameFolder).copyhere oApp.Namespace(Fname).items |
All times are GMT +1. The time now is 09:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com