m iFile As Long
Dim sFileName As String
Dim iPos As Long
   
   ' Clear input arrays
   Erase sFiles
   iFileCount = 0

   ' Get handle to CF_HDROP if any:
   hDrop = GetClipboardMemoryHandle(CF_HDROP)
   If (hDrop &lt;&gt; 0) Then
      iFileCount = DragQueryFile(hDrop, -1&amp;, "", 0)
         
      If (iFileCount &gt; 0) Then
         ' Allocate space for return and working variables.
         ReDim sFiles(1 To iFileCount) As String
         sFileName = String$(MAX_PATH, 0)
   
         ' Retrieve each 