title: Using VBA to unzip file without prompting me once (choose "Yes to All" for any dialog box)
body: <p>There is an unzipping code I'd like to adjust 4 my needs.</p>
  
  <pre><code>Sub Unzip()
      Dim FSO As Object
      Dim oApp As Object
      Dim Fname As Variant
      Dim FileNameFolder As Variant
      Dim DefinePath As String
  
            ' Fname = Application.GetOpenFilename(filefilter:="Zip Files (*.zip), *.zip", MultiSelect:=False)
      Fname = "C:\Users\michal\SkyDrive\csv\bossa\mstcgl.zip"
  
      If Fname = False Then
            'Do nothing
      Else
            'Destination folder
         DefinePath = "C:\Users\michal\SkyDrive\csv\bossa\mstcgl_mst\"    ' Change to your path / variable
         If Right(DefinePath, 1) &lt;&gt; "\" Then
             DefinePath = DefinePath &amp; "\"
         End If
  
         FileNameFolder = DefinePath
  
          '        Delete all the files in the folder DefPath first if you want.
          '        On Error Resume Next
          '        Kill DefPath &amp; "*.*"
          '        On Error GoTo 0
  
          'Extract the files into the Destination folder
         Set oApp = CreateObject("Shell.Application")
         oApp.Namespace(FileNameFolder).CopyHere oApp.Namespace(Fname).items
  
          ' MsgBox "You find the files here: " &amp; FileNameFolder
  
        On Error Resume Next
        Set FSO = CreateObject("scripting.filesystemobject")
        FSO.deletefolder Environ("Temp") &amp; "\Temporary Directory*", True
     End If
  End Sub
  </code></pre>
  
  <p>Somewhere here:</p>
  
  <pre><code>  `Set oApp = CreateObject("Shell.Application")
     oApp.Namespace(FileNameFolder).CopyHere`  
  </code></pre>
  
  <p>a dialog box appears asking me if I want to overwrite the file that have the same names - and Yes I do want to overwrite them, but without answering the dialog box - I would like to hardcode it into the code, please.</p>
  
  <p><a href="https://i.stack.imgur.com/ljzpn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ljzpn.png" alt="enter image description here"></a></p>
  
  <p>I've found this page <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb787866(v=vs.85).aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/windows/desktop/bb787866(v=vs.85).aspx</a>  but I just don't know how to add this parameter #16 which is "Respond with "Yes to All" for any dialog box that is displayed."
  Can U help me with that?</p>
  
  <p>And the last thing:
  can You explain <code>oApp.Namespace(Fname).items</code> line for me.
  I've really tried to guess it myself, but I thing I'm to short 4 this.</p>