(0)| 4/7/2021 9:03 AM | |
|
Posts: 1 Rating:
|
Hello everyone, I have an action prepared with VBS. I have defined a cyclic trigger for this action and it doesn't work at all.Hemant ShindeHemant Shinde But when I write thie same script into a button click event, it works fine (within seconds). By the way, Global Script Runtime is enabled. I am stuck at this point and I really need some help. here is my code,same code work fine with button click cmd,but during cyclic tigger it shown Type mismatch: Error line 12 Sub procedure1 Dim objXlApp,objXlWa1,objXLWa2,objXLWb Dim hr Set objXLApp= Createobject("Excel.Application") objXLApp.Visible=False Set objXLWb=objXLApp.Workbooks.open("E:\stamp.xlsx") Set objXLWa1=objXLWb.sheets(1) Set objXLWa2=objXLWb.sheets(2) With objXLWa1 .cells(1,1).value= Date .cells(1,2).value= Time .cells(1,3).value= smarttags("TAG_1") .cells(1,4).value= smarttags("TAG_1") End With objXLWb.save objXLWb.close objXLApp.quit Set objxlwb = Nothing Set objxlwa1 = Nothing Set objxlwa2 = Nothing Set hr = Createobject("wscript.Shell") hr.Run "C:\Users\heman\OneDrive\Documents\code_exc.bat",1 Msgbox ("Report Generated sucssfully") End Sub Regards, Hemant ------------------------------------------------------------------------------------------ |
Last edited by: Jen_Moderator at: 04/07/2021 11:07:04New subject after splitting |
|
Follow us on