Hi Tomylee,
Please use this i hope this will help you.
Code:
Public Sub GetBrandsFiles()
Dim varArrFile As Variant
Dim intCtr As Integer
Dim strFiles As String
Dim rngFiles As Range
With ThisWorkbook.Worksheets("Sheet2")
Set rng = .Range("A1")
varArrFile = Application.GetOpenFilename("*.xls,*.xlsx", , "Select Brands Files", , True)
If IsArray(varArrFile) = False Then
MsgBox "Please Select Brand File..."
shtIndex.Range("rngBrand1").Value = ""
Exit Sub
Else
rng.Offset(0, 1).Value = "Following Files have selected by you :"
For intCtr = LBound(varArrFile) To UBound(varArrFile)
rng.Offset(intCtr, 1).Value = varArrFile(intCtr)
Next
End If
End With
End Sub
Regards
Prince
Bookmarks