Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I've created a .qvw file that runs .vbs file, which runs macro-based excel file and everything works fine, when I run .qvw file locally. It runs the .vbs file and the macro in excel file as well.
However, when I set a task in QMC to the .qvw file and run the task, it seems to open the excel file, but that's it. It stucks in editing and I'm not able to remove / edit the excel file anymore.
Could you advise me how to abort the editing, please? I've already removed the task from server, but it didn't help. It still shows me that the file is locked for editing by 'sysBITechQvLdnDev', which is the Qlik server.
Also, if you can advise me how to make QMC to run the .vbs file and then save excel file, properly, please?
Qlik code:
SET vCSCRIPT = 'c:\windows\system32\cscript.exe';
EXECUTE $(vCSCRIPT) "<PATH>\Refresh_TC_contacts.vbs";
VBS code:
Set objExcel = CreateObject("Excel.Application")
objExcel.Application.Run "'<PATH>\TC contacts.xlsm'!Refresh.Refresh"
objExcel.DisplayAlerts = False
objExcel.Application.Quit
Set objExcel = Nothing
Macro code:
Sub Refresh()
ActiveWorkbook.RefreshAll
ActiveWorkbook.Save
End Sub
Many thanks!