VBA/Excel/Access/Word/Excel/Excel Transfer
Материал из VB Эксперт
Перейти к: навигация , поиск
acExport
Private Sub cmdSalesSheet_Click()
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qryAllSalesFigures", "C:\Sales.xls"
End Sub
acLink
Private Sub cmdLink_Click()
DoCmd.TransferSpreadsheet , acSpreadsheetTypeExcel9, "SalesFigures", "C:\Sales.xls", True
End Sub
Linking a Spreadsheet
Sub link()
DoCmd.TransferSpreadsheet acLink, acSpreadsheetTypeExcel9, _
"SalesFigures", "C:\Sales.XLS", True
MsgBox "Spreadsheet linked"
End Sub