K
Kevin McCartney
Hi, many thanks to 'Dan Artuso' for the original help but
I need a little it more code because I need to use the API
call IsWindowVisible and DestroyWindow but both need the
window handle, thus Dan showed me how to get the process
ID but I need the hwnd as well. Thus if some knows of a
function that retrieves the hwnd of a window (does a
hidden window have a hwnd?). The background is that I
export data to an Excel workbook and use 'Dim xlApp as New
Excel.Application' thus each time the procedure is
executed a new Excel Application is used, but when the
user closes the workbook window the Excel Application
becomes hidden and remains as a process. Therefore I need
to Destroy the 'hidden' windows. Alternatively if someone
has a code example that would allow me to use an Excel
session that is currently open this would also help. The
code also needs to able to run in Access 97.
Thanks in advance
regards
KM
I need a little it more code because I need to use the API
call IsWindowVisible and DestroyWindow but both need the
window handle, thus Dan showed me how to get the process
ID but I need the hwnd as well. Thus if some knows of a
function that retrieves the hwnd of a window (does a
hidden window have a hwnd?). The background is that I
export data to an Excel workbook and use 'Dim xlApp as New
Excel.Application' thus each time the procedure is
executed a new Excel Application is used, but when the
user closes the workbook window the Excel Application
becomes hidden and remains as a process. Therefore I need
to Destroy the 'hidden' windows. Alternatively if someone
has a code example that would allow me to use an Excel
session that is currently open this would also help. The
code also needs to able to run in Access 97.
Thanks in advance
regards
KM