Hi all,
My macro involves files extraction from zip and saving under a specified name. If I was to rerun the macro, I am being told that the file with such name existing and asking whether we should replace it?
Can I pre-select the answer in VBA, so that I don't need to click "Yes" and "Copy and Replace" every time?
Thank you.
Saving over:
Unzipping:
My macro involves files extraction from zip and saving under a specified name. If I was to rerun the macro, I am being told that the file with such name existing and asking whether we should replace it?
Can I pre-select the answer in VBA, so that I don't need to click "Yes" and "Copy and Replace" every time?
Thank you.
Saving over:
VBA Code:
Set wkBk = ActiveWorkbook
wkBk.Sheets("1").Copy
ActiveWorkbook.SaveAs "location"
ActiveWorkbook.SaveAs "location 2"
ActiveWorkbook.Close
VBA Code:
Set Sh = CreateObject("Shell.Application")
With Sh
.Namespace(destFolder).CopyHere .Namespace(localZipFile).Items
End With
Set myApp = CreateObject("Excel.Application")