1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:="ODBC;DSN=AS400;", Destination _
:=Range("A1"))
.CommandText = Array( _
"SELECT T1.IIPROD, T2.IDESC, T2.IPURC, Max(T3.ICRELP), T2.STKMIN, T4.STKJOU, T4.STKJ01, T4.STKJ02_
,,,,,,,,,)
.Name = "comparaison stock simule - sotck mini bpcs_1"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.SourceConnectionFile = _
"F:\DOSSIER\DOSSIER\comparaison stock simule - sotck mini bpcs.dqy"
.Refresh BackgroundQuery:=False
End With
End Sub |
Partager