Hi,
i am using code like:
and instead only one file matching the pattern i have all files:
Can anybody help ?
Why this is happening? Why this is not filtering?
Best,
Jacek
i am using code like:
Code:
sub test
Const partialName As String = "OsServerRestriction"
Const partialExt As String = "*.csv"
Dim fd As Object
Set fd = Application.FileDialog( _
DialogType:=3)
Dim fileName As String
With fd
.Title = "Select " & partialName & " File"
.initialfilename = "E:\VnomicRep\Master_Workbook-Microsoft\Azure_Workbook\ImportData"
With .Filters
.Clear
.Add partialName, partialExt
End With
If .Show Then
selectFile = .SelectedItems(1)
Else
MsgBox "Cancelled by user"
End
End If
End With
Set fd = Nothing
CurrentDb.Execute "DELETE * FROM Temp_SoftwareComponentsOses", dbFailOnError
DoCmd.TransferText transferType:=acImportDelim, TableName:="Temp_SoftwareComponentsOses", SpecificationName:="Temp_SoftwareComponentsOses", fileName:=selectFile, hasfieldnames:=True
MsgBox "Loaded!"
End Sub
and instead only one file matching the pattern i have all files:
Can anybody help ?
Why this is happening? Why this is not filtering?
Best,
Jacek