Your technology certification is waiting. Enroll in Cloud Class ®
Dim strFilename As String
Dim wkb As Workbook
Dim wks As Worksheet
Const cPath As String = "C:\Users\AikiMark\Downloads\Q_28618360\"
strFilename = Dir(cPath & "*.csv")
Do Until Len(strFilename) = 0
Set wkb = Workbooks.Open(cPath & strFilename)
Set wks = wkb.Sheets(1)
wks.Range(wks.Range("A2"), wks.Range("A2").Offset(ActiveSheet.Range("A2").End(xlToRight).Column - 1, 0)).Value = _
strFilename = Dir
Open in new window
Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.