Hi all
Please help i need to get multiple file names from folder in one excel cell i got the file names in rows using Kutool import file names but i need in one cell separated by coma
Can any one help me i need vb code for that
PFA
Thanks
Hi all
Please help i need to get multiple file names from folder in one excel cell i got the file names in rows using Kutool import file names but i need in one cell separated by coma
Can any one help me i need vb code for that
PFA
Thanks
the folder name is in A1
the result is in A2
alter to your descretion
Please Login or Register to view this content.
Thanks that's works but i have to change the column A1 and column A2 every time in code can you do something about it
A1 B1
Folder path result
D:\All Files\iphone 7\136\colour Swho1.jpg
D:\All Files\iphone 7\137\colour
D:\All Files\iphone 7\138\colour
'-------------
Public Sub ScanAllFilesInFolder()
'-------------
'folder name is in A1
Range("A1").Select
'files in folder in A2
Range("B1").Value = getAllFiles1Dir1Cell(ActiveCell.Value)
End Sub
Put the function in a standard module.Please Login or Register to view this content.
Put all you're foldernames in column A.
in toprow of column b next to first foldername typewhere A2 is referring to name in column APlease Login or Register to view this content.
and drag down as long as foldernames in Colum A.
Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks