P
Powerguy
Hi all,
I am looking for a way to get the Process id (or a handle) of an EXCEL
process created from within my code.
For example when the following code is executed:
Dim EXL As Excel.Application = New Excel.Application
a new instance of EXCEL.EXE is created in the task manager.
I am looking for some code (or ideas) of how to identify this
particular instance of EXCEL.EXE AS IT IS CREATED. I know I can use
something like this:
Dim localByName As Process() = Process.GetProcessesByName("excel")
but this code will give me ALL instances of EXCEL processes running on
the computer. I know I can also get the users of the processes but
what if I myself had just say 5 instances of EXCEL already running on
my computer?? How do I identify which is the Process Id of EXCEL
created (opened) by my code??
I'm sure some smart people out there have the answers! Appreciate any
help.
PowaGuy
I am looking for a way to get the Process id (or a handle) of an EXCEL
process created from within my code.
For example when the following code is executed:
Dim EXL As Excel.Application = New Excel.Application
a new instance of EXCEL.EXE is created in the task manager.
I am looking for some code (or ideas) of how to identify this
particular instance of EXCEL.EXE AS IT IS CREATED. I know I can use
something like this:
Dim localByName As Process() = Process.GetProcessesByName("excel")
but this code will give me ALL instances of EXCEL processes running on
the computer. I know I can also get the users of the processes but
what if I myself had just say 5 instances of EXCEL already running on
my computer?? How do I identify which is the Process Id of EXCEL
created (opened) by my code??
I'm sure some smart people out there have the answers! Appreciate any
help.
PowaGuy