bryanrobson
New Member
- Joined
- Aug 19, 2022
- Messages
- 21
- Office Version
- 365
- Platform
- Windows
Hi. I want to be able to modify the below code to firstly drop the need for the msgbox. So when the prompt appears to select a file to open it actually says "Select today's file". and also change it so that it only limits showing *.xlsx files.
Many thanks
Set fd = Application.FileDialog(msoFileDialogFilePicker)
fd.AllowMultiSelect = False
MsgBox "Select today's file"
fd.InitialView = msoFileDialogViewList
fd.AllowMultiSelect = True
FileChosen = fd.Show
If FileChosen = -1 Then
For i = 1 To fd.SelectedItems.Count
Call ReadDataFromSourceFile(fd.SelectedItems(i))
Next i
End If
Many thanks
Set fd = Application.FileDialog(msoFileDialogFilePicker)
fd.AllowMultiSelect = False
MsgBox "Select today's file"
fd.InitialView = msoFileDialogViewList
fd.AllowMultiSelect = True
FileChosen = fd.Show
If FileChosen = -1 Then
For i = 1 To fd.SelectedItems.Count
Call ReadDataFromSourceFile(fd.SelectedItems(i))
Next i
End If