File Dialog Box

File Open Dialog Box – Excel VBA to Multiple Files

File Open Dialog Box – Excel VBA to Multiple Files   Function importExcelFile(bMultipleFile As Boolean) Dim intChoice As Integer Dim strPath As String Dim i As Integer ‘Remove all other filters Call Application.FileDialog(msoFileDialogOpen).Filters.Clear ‘Add a custom filter Application.FileDialog(msoFileDialogOpen).AllowMultiSelect = bMultipleFile Call Application.FileDialog(msoFileDialogOpen).Filters.Add( _ “Excel Files Only”, “*.xls*”) ‘make the file dialog visible to the...

File Open Dialog Box – Excel VBA to choose file

File Open Dialog Box – Excel VBA to choose file Function FileOpenDialogBox() With Application.FileDialog(msoFileDialogFilePicker) .AllowMultiSelect = False .Filters.Add “Excel Files”, “*.xlsx; *.xlsm; *.xls; *.xlsb”, 1 .Show ‘Store in fullpath variable fullpath = .SelectedItems.Item(1) End With If InStr(fullpath, “.xls”) = 0 Then Exit Function End If Workbooks.Open fullpath End Function   sub Main_program() Dim filepath...

Published On

December 2018
M T W T F S S
« Nov    
 12
3456789
10111213141516
17181920212223
24252627282930
31