[VBA ] Access 定時傳送資料 到 Excel
我想把一個資料庫內的檔案"資料表2",
在表單按下按鈕後.
每過1分鐘自動把資料傳送到一個Excel的檔案"d.XLS",
其中傳送的部分我已經寫好了:
Private Sub 指令0_Click()
DoCmd.TransferSpreadsheet acExport, 8, "資料表2", _
"d.XLS", True, ""
Set n = CreateObject("EXCEL.APPLICATION") '呼叫Excel
n.Caption = "客戶訂單圖表"
n.Visible = True '顯示在螢幕上
For I = 1 To n.TOOLBARs.Count - 1
n.TOOLBARs(I).Visible = False '關閉所有工具列
Next
n.Workbooks.Open "d.XLS"
n.Windows(1).DisplayWorkbookTabs = False '不顯示工作表索引標籤
n.DisplayFormulaBar = False '關閉資料編輯列
End Sub
但是定時傳送的部分我做不出來,
請問這部份該怎麼做呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.133.32.139
推
10/05 16:51, , 1F
10/05 16:51, 1F
Visual_Basic 近期熱門文章
PTT數位生活區 即時熱門文章