Hi Everyone,
I am at initial stage of learning VBA Macro
I need small help to get file names from a particular assigned folder and i tried below coding its not working and i am unable to understand why its not working.
can anyone please help me in this and i need this steps for cumulating purpose.![]()
Sub get_filename() Dim fdr As String mrow = 8 macro_sheet = ActiveWorkbook.Name spath = Range("B2").Value fdr = Dir(spath & "\" & "*.*") Do While fdr <> "" 'Debug.Print fdr Cells(mrow, 5).Select fdr = Dir mrow = mrow + 1 Loop End Sub
Thanks in Advance !
MNR.
Moderator's note: Don't forget to put code tags around your codes. thanks.
Bookmarks