DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub Test()
' Haluk - 25/09/2018
Dim FSO As Object, MyFolder As Object, MyFile As Object
Dim strDocuments As String
Dim i As Long
Range("E2:E" & Rows.Count) = Empty
Set WshShell = CreateObject("WScript.Shell")
strDocuments = WshShell.SpecialFolders("Desktop")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set MyFolder = FSO.GetFolder(strDocuments & Application.PathSeparator & "Resimler")
i = 2
For Each MyFile In MyFolder.Files
If FSO.getExtensionName(MyFile) = "jpg" Then
Range("E" & i) = FSO.getBaseName(MyFile)
ActiveSheet.Hyperlinks.Add Anchor:=Range("E" & i), Address:=MyFile
i = i + 1
End If
Next
Set WshShell = Nothing
Set MyFolder = Nothing
Set FSO = Nothing
End Sub
Set MyFolder = FSO.GetFolder(strDocuments & Application.PathSeparator & "Resimler")
Sub Test2()
' Haluk - 25/09/2018
Dim FSO As Object, MyFolder As Object, MyFile As Object
Dim arrPicExt As Variant, j As Long
Dim strDocuments As String
Dim i As Long
Range("E2:E" & Rows.Count) = Empty
Set WshShell = CreateObject("WScript.Shell")
strDocuments = WshShell.SpecialFolders("Desktop")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set MyFolder = FSO.GetFolder(strDocuments & Application.PathSeparator & "Resimler")
i = 2
arrPicExt = Array("gif", "png", "bmp", "jpeg", "jpg", "tif")
For Each MyFile In MyFolder.Files
For j = LBound(arrPicExt) To UBound(arrPicExt)
If FSO.getExtensionName(MyFile) = arrPicExt(j) Then
Range("E" & i) = FSO.getBaseName(MyFile)
ActiveSheet.Hyperlinks.Add Anchor:=Range("E" & i), Address:=MyFile
i = i + 1
End If
Next
Next
Erase arrPicExt
Set WshShell = Nothing
Set MyFolder = Nothing
Set FSO = Nothing
End Sub
Merhaba,Haluk bey, köprü ekleme olmamış. köprüde resimlerin adresi olması gerekiyor. örnek: (C:\Users\hakan\Desktop\Resimler\53.jpg) indesing proğramında resimleri çağırmıyor.