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
|
Public Function ExportFundDetail()
'ouverture fichier excel existant
Set Appexcel = CreateObject("Excel.Application")
Appexcel.Visible = True
Set Wbexcel = Appexcel.Workbooks.Open("F:\Transit\Gffunds\Hedge\BaseDEdonnées\Report\DetailledReports\Funds_Global.xls")
Appexcel.Sheets("Template").Select
'Dernier ManagerReport
SQLFund3 = "SELECT TOP 1 ManagerReport.* FROM ManagerReport WHERE ID_fund=" & IDFundExcel & " ORDER by Date DESC;"
Set rs3 = CurrentDb.OpenRecordset(SQLFund3)
While Not rs3.EOF
Appexcel.Cells(153, 13).Value = rs3(1)
Appexcel.Cells(156, 2).Value = rs3(6)
Appexcel.Cells(163, 2).Value = rs3(11)
Appexcel.Cells(170, 2).Value = rs3(7)
Appexcel.Cells(177, 2).Value = rs3(9)
Appexcel.Cells(186, 2).Value = rs3(10)
Appexcel.Cells(195, 2).Value = rs3(8)
Appexcel.Cells(214, 2).Value = rs3(12)
rs3.MoveNext
Wend
Set rs3 = Nothing
End Function |
Partager