I am getting the following exception with invoke code vb
Please help. Thank you,
Invoke code: Exception has been thrown by the target of an invocation.
RemoteException wrapping System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> RemoteException wrapping System.ComponentModel.Win32Exception: Access is denied
at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId,
Int32 access,
Boolean throwIfExited)
at System.Diagnostics.Process.GetProcessHandle(Int32 access,
Boolean throwIfExited)
at System.Diagnostics.Process.Kill()
at UiPathCodeRunner_cf4413ce22b34d6ca5ee8c28c153860e.Run(String In_aug_cFull_Output_Path,
@Anil_G
The issue re-surfaced.
Inside the vb.net code, there is an Excel kill, I guess, this is what is giving the access denied error, may be? What can I do about this? Thank you,
'Remove any Excel process still in memory…
Dim nPos As Integer
For Each prog As Process In Process.GetProcesses
nPos = InStr(prog.ProcessName.ToUpper, “EXCEL”)
If nPos > 0 Then
prog.Kill
End If
Next