Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net Select Multiple Files without holding Ctrl button

Hi

I am usingthe following VB.net code to allow the user to select multiple files while holding the Ctrl button.
Is there a way for the user to not hold the Ctrl button and still select multiple files?



     Me.OpenFileDialog1.Multiselect = True

            Dim dr As DialogResult = Me.OpenFileDialog1.ShowDialog()
            If (dr = System.Windows.Forms.DialogResult.OK) Then
                ' Read the files 
                Dim file As String
                For Each file In OpenFileDialog1.FileNames

                    Try
                        'MsgBox(file)
                        oFullWordToLookForInMaster = Get_Word_to_Match_Abbreviation(file)
                        Me.DataGridView1.Rows.Add("", "", file, oActiveSheetName, oFullWordToLookForInMaster, "", "")

                    Catch ex As Exception
                        MsgBox(ex.Message)
                    End Try
                Next file
            End If

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks very much