Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ドロップされたEXCELファイルを処理するvbsの雛形
Option Explicit
Dim args
Dim fileName
Set args = WScript.Arguments
For Each fileName in args
Call proc(fileName)
Next
Sub proc(fileName)
On Error Resume Next
Dim excel
Set excel = CreateObject("Excel.Application")
'excel.Visible = True
excel.Workbooks.Open(fileName)
''
'' Any Code
''
excel.DisplayAlerts = False
excel.Quit
Set excel = Nothing
On Error Goto 0
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment