Retrieve HTML Files from a folder

     

  • Through this program user can retrieve HTML extension files from a folder
  •  

     

    Private Sub CommandButton1_Click()
    Dim souce As String
    Source = "D:\Sales\January\"
    Dim filename As String
    filename = Dir(Source & "*.html")
    Dim sh2
    Set sh2 = ThisWorkbook.Sheets("sheet2")
    r = 1
    Do While filename <> ""
    sh2.Cells(r, 1).Value = filename
    filename = Dir
    r = r + 1
    Columns(2).AutoFit
    Loop
    End Sub

    Download The Workbook