Skip to content

Instantly share code, notes, and snippets.

@moguno
Last active September 21, 2023 12:46
Show Gist options
  • Save moguno/ec91f589fc8d22242035268f8594e032 to your computer and use it in GitHub Desktop.
Save moguno/ec91f589fc8d22242035268f8594e032 to your computer and use it in GitHub Desktop.
xlsxファイルをドラッグアンドドロップするだけで初期セル位置をA1に移動させるWSHスクリプト
Dim objExcel
Set objExcel = CreateObject("Excel.Application")
Dim objBook
Set objBook = objExcel.Workbooks.Open(WScript.Arguments(0))
Dim objSheet
For Each objSheet In objBook.WorkSheets
objSheet.Cells(1, 1).Select()
Next
objBook.Save()
objBook.Close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment