I've been looking for threads that could help me with this error "Call was rejected by callee" but I've found nothing, so far, that could help me. I'm new to VBScript and I've been learning to create a script that could automatically transfer data from database to Excel through a button in ClearSCADA. My project is about creating a script code for a button in ClearSCADA HMI where when I press it, it can automatically export any data (like an alarms list or events list) from the scada server to Excel.
I keep getting this error "Call was rejected by callee" and it's always in this part (seen below) of my code that causes this error.
xlSheet.Cells(1, 1).Value = "Severity"
xlSheet.Cells(1, 2).Value = "Message"
xlSheet.Cells(1, 3).Value = "Time"
xlSheet.Cells(1, 4).Value = "Source"
xlSheet.Cells(1, 5).Value = "User"
Also here's a picture of the error:
UPDATE: It worked! I decided to put delay in between xlApp.ActiveWorkbook.SaveAs "C:\HData.xlsx"
and xlSheet.Cells(1, 1).Value = "Severity"
. Thanks for the help!!!