Hello,
im using a VB script to launch an .xls (excel) file. This works fine except for one excel file that should run an Auto_open macro when launched. It does run perfectly when launched from the windows explorer but won't run when launched via the VB script. I can run the macro from the Excel menu after opening the file with the VB script but it won't Auto run.
Any ideas?
My script:
<script type=text/vbscript>
<!--
Function sjabloonxls(waarde)
Dim objexcel
Dim waarde2
Set objexcel = CreateObject("Excel.Application")
objexcel.Quit
Set objexcel = Nothing
Set objexcel = CreateObject("Excel.Application")
objexcel.Visible = True
objexcel.WindowState = 1
waarde2 = "G:\data\HIP\IGG\sjablonen\" + waarde
Set mijndocument = objexcel.Workbooks.Add(waarde2)
Set objexcel = Nothing
Set mijndocument = Nothing
End Function
-->
</script>
thanks.
im using a VB script to launch an .xls (excel) file. This works fine except for one excel file that should run an Auto_open macro when launched. It does run perfectly when launched from the windows explorer but won't run when launched via the VB script. I can run the macro from the Excel menu after opening the file with the VB script but it won't Auto run.
Any ideas?
My script:
<script type=text/vbscript>
<!--
Function sjabloonxls(waarde)
Dim objexcel
Dim waarde2
Set objexcel = CreateObject("Excel.Application")
objexcel.Quit
Set objexcel = Nothing
Set objexcel = CreateObject("Excel.Application")
objexcel.Visible = True
objexcel.WindowState = 1
waarde2 = "G:\data\HIP\IGG\sjablonen\" + waarde
Set mijndocument = objexcel.Workbooks.Add(waarde2)
Set objexcel = Nothing
Set mijndocument = Nothing
End Function
-->
</script>
thanks.