quelqu'un pourrait il m'aider
j'ai créer un vb permettant d'importer un fichier texte dans access mais ça me fait "sub fonction non définie"
c du à quoi svp . merci d'avance
voici mon code :
Sub Macro1()
'macro permettant d'importer un fichier
'
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;U:\nc.txt" _
, Destination:=Range("A1"))
.Name = "nc"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 1252
.TextFileStartRow = 1
.TextFileParseType = xlFixedWidth
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileFixedColumnWidths = Array(1, 3, 8, 6, 10, 10, 5, 15, 9, 19, 6, 10, 16, 6, 7, 8, 26 _
)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub