geebee wrote:
Hi,
i have te following code behind a button:
' Create an instance of Excel and add a workbook
Set xlApp = CreateObject("Excel.Application")
Set xlWb = xlApp.Workbooks.Add
Set xlWs = xlWb.Worksheets("Sheet1")
The only problem is, if users click the button 20 times, there are 20
instances of Excel open on the machine, thereby slowing computer performance.
I want Excel to be oneped ONLY if it is not currently opened on the users
machine to prevent multiple excel instances. how can I achieve this?
Thanks in advance,
-geebee
I vaguely recall that some API calls can return the list of processes
currently running on a machine. I have the code somewhere in some mdb
file residing somewhere on some machine at home so try Googling first.
James A. Fortune