Option Explicit
Dim objShell

Set objShell = CreateObject("WScript.Shell")
objShell.Run "excel F:\SynologyDrive\myfile\個人\自動起動.xlsm"

'Excel起動待機
WScript.Sleep 5000


'時間シートを必ず選ばせる
objShell.SendKeys "^{PGUP}"
objShell.SendKeys "^{PGUP}"


'時間シートの転記先に移動
objShell.SendKeys "^{HOME}"
objShell.SendKeys "^{DOWN}"
objShell.SendKeys "{DOWN}"

'現在時間登録
objShell.SendKeys "^;"
objShell.SendKeys " "
objShell.SendKeys "^:"


'チャートシートを選択
objShell.SendKeys "^{PGDN}"


'チャートシートの先頭に移動
objShell.SendKeys "^{HOME}"


'A6選択
objShell.SendKeys "{DOWN}"
objShell.SendKeys "{DOWN}"
objShell.SendKeys "{DOWN}"
objShell.SendKeys "{DOWN}"
objShell.SendKeys "{DOWN}"


'時系列削除
objShell.SendKeys "^+{RIGHT}"
objShell.SendKeys "^+{DOWN}"
objShell.SendKeys "{DELETE}"


'RSS時系列データ取得待機
WScript.Sleep 5000


'コピー
objShell.SendKeys "^{DOWN}"
objShell.SendKeys "^+{RIGHT}"
objShell.SendKeys "^c"


'時間シートの先頭に移動
objShell.SendKeys "^{PGUP}"


'時系列データのペースト
objShell.SendKeys "{RIGHT}"
objShell.SendKeys "^v"



'保存と終了
objShell.SendKeys "^s"
objShell.SendKeys "%{F4}"


set objShell = nothing