ThanksHi Team,
<strike></strike>
I am unable to paste multiple file name in range("b5") through MSOFileDialogPicker.
below are my code. its only pasting single file name instead of all files.plz assist.
Option Explicit
Sub SelectSeveralFiles()
Dim fd As FileDialog
Dim FileChosen As Integer
Dim FileName As String
Dim i As Integer
Set fd = Application.FileDialog(msoFileDialogFilePicker)
fd.InitialFileName = "E:\Pivot\mallesh"
fd.InitialView = msoFileDialogViewList
'allow multiple file selection
fd.AllowMultiSelect = True
FileChosen = fd.Show
If FileChosen = -1 Then
FileName = fd.SelectedItems.Count
Range("b5").Value = FileName
'open each of the files chosen
'For i = 1 To fd.SelectedItems.Count
'Range("b5").Value = fd.SelectedItems(i)
''Workbooks.Open fd.SelectedItems(i)
'Next i
End If
End Sub
<strike></strike>
Mallesh