P
Peter Rooney
Good morning all!
I want to be able to let the user select multiple files from a
GetOpenFileName dialog box, but also filter the file list to Excel files only
and trap for the user pressing Escapel.
If I use:
SAPDataWorkbook = Application.GetOpenFilename()
If SAPDataWorkbook = False Then
Exit Sub
End If
Workbooks.Open Filename:=SAPDataWorkbook
I can press escape OK AND open a workbook
If however I change the first line thus:
SAPDataWorkbook = Application.GetOpenFilename( _
filefilter:="Excel Files (*.xls),*.xls", MultiSelect:=True)
If SAPDataWorkbook = False Then
Exit Sub
End If
Workbooks.Open Filename:=SAPDataWorkbook
to filter to *.xls I can press escape, but get the message "Type mismatch"
with
If SAPDataWorkbook = False Then
highlighted.
Can anyone out there help, please?
Thanks in advance
Pete
I want to be able to let the user select multiple files from a
GetOpenFileName dialog box, but also filter the file list to Excel files only
and trap for the user pressing Escapel.
If I use:
SAPDataWorkbook = Application.GetOpenFilename()
If SAPDataWorkbook = False Then
Exit Sub
End If
Workbooks.Open Filename:=SAPDataWorkbook
I can press escape OK AND open a workbook
If however I change the first line thus:
SAPDataWorkbook = Application.GetOpenFilename( _
filefilter:="Excel Files (*.xls),*.xls", MultiSelect:=True)
If SAPDataWorkbook = False Then
Exit Sub
End If
Workbooks.Open Filename:=SAPDataWorkbook
to filter to *.xls I can press escape, but get the message "Type mismatch"
with
If SAPDataWorkbook = False Then
highlighted.
Can anyone out there help, please?
Thanks in advance
Pete