1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| Sub IDG01_mac()
DoEvents
'
DbDSN = "DATA"
Dbdir = "C:\"
DbName = Dbdir + "IDG_DATA_BASE.mdb"
DbTable = Dbdir + "IDG_DATA_BASE"
SaveDir = Dbdir '"\\Station1\ALL_user\IDG_DATA\"
'
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=" & DbDSN & ";UID=;PWD=;APP=Microsoft Office 2003;WSID=POSTE-001;DATABASE=PGM_DATA" _
, Destination:=Range("A2"))
.CommandText = Array( _
"SELECT A_IDG_Last.Pgm_Num, A_IDG_Last.Pgm_Date, A_"
.Name = "Lancer la requête à partir de RMP_PGM_Data"
.FieldNames = False
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = True
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0
.PreserveColumnInfo = True
.Refresh BackgroundQuery:=False
End With
GoTo NoRequest
NoRequest: |