[SIZE=1]Option Explicit
Private Sub CommandButton1_Click()
Dim iavntDir As Long
Dim avntDir As Variant
With Application 'fast
.Calculation = xlCalculationManual
.EnableEvents = False
.ScreenUpdating = False
End With
With Worksheets("Blad1")
.Range("A2").CurrentRegion.Offset(1, 0).Clear
avntDir = Split(CreateObject("Wscript.Shell").Exec("cmd /c dir """ & Range("C2").Value & """ /s /b").StdOut.ReadAll, vbCrLf)
For iavntDir = 1 To UBound(avntDir)
.Hyperlinks.Add .Cells(iavntDir + 1, 1), avntDir(iavntDir)
Next
.Columns(1).AutoFit
Application.Goto .Range("A2")
End With
With Application 'slow
.Calculation = xlCalculationAutomatic
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub[/SIZE]