- Katılım
- 25 Aralık 2007
- Mesajlar
- 99
- Excel Vers. ve Dili
- excel 2003
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub PathBul_DosyaGetir_Linkekle()
On Error GoTo Son
Application.ScreenUpdating = False
Yol = ""
Set objFolder = CreateObject("Shell.Application").BrowseForFolder(0, "DOSYO YOLUNU BULUNUZ !", 0)
If Not objFolder Is Nothing Then
Yol = objFolder.Items.Item.Path
End If
If Yol = "" Then Exit Sub
[B1] = Yol
YolUzunluk = Len(Yol)
Range("A2:A1000").ClearContents
Set Dosyalar = Application.FileSearch
With Dosyalar
.LookIn = Yol
.SearchSubFolders = False
.Filename = "*.xls"
If .Execute() > 0 Then
Buldum = 1
Adet = .FoundFiles.Count
For i = 1 To Adet
Cells(i + 1, 1) = Right(.FoundFiles(i), Len(.FoundFiles(i)) - YolUzunluk - 1)
Next i
End If
End With
Columns("A:A").Columns.AutoFit
'----------------------------------- Linkleri Vermeye Başla Bakem --------------
For i = 2 To [A65536].End(3).Row
Range("A" & i).Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=Yol & "\" & Cells(i, "A")
' Yol & Cells(i, "A") & ".xls"
Next i
Application.CommandBars("Web").Visible = False
Son:
End Sub